macos-cookbook/README.md

137 строки
5.4 KiB
Markdown
Исходник Обычный вид История

Release plist and macos_user resources, new Xcode libraries, test cookbook and documentation. (#24) * first commit plistbuddy * all recipe/plist in macos * extract plistbuddy to resource * Straighten out unit tests - Correctly include modules - Correctly setup spec_helper - Correct unit test / respec setup * first passing test * add more data type tests * Most data types passing - Boolean values are working - Array and data type values are not - PlistBuddy "commands" (add, print, etc.) are passing * More testing - Skip Array and Dict types as their implementation will be more complicated - Add test for float type - Put the correct type in the test description - Cookstyle changes * PlistBuddy and testing update - Add separate test cookbook for PlistBuddy resource - Add kitchen.yml for the above purpose - Modify and update plistbuddy resource/helpers * remove extra newline * add metadata file * edit metadata; add Berksfile * move Berksfile to correct location * add testing requirements for berks vendor * move kitchen file * Converge passing in test cookbook - Opportunistic cleanup of xcode test - some temp debugging info in resource definition - Rename name_property to command so as to not override action * Itempotence - Removed 'bool' prefix from boolean types, as that was somehow causing issues - Changed name_property to the path and removed that property - Use actual actions in the resource for the PlistBuddy commands * Fix false positive? - Not sure how the previous test was passing previously, but I adjusted the boolean value for the BazEntry test so that the signature input matches the output * Add logic for adding a value - The data type should only be used when adding a value to a plist. Otherwise, we don't need to use the data type * remove debugging; fix smoke tests * remove .kitchen.yml * bump version to 0.8.5 * unskip ChefSpec tests - they're passing * mark args_formatter as private method * Feature/macos user (#14) * first commit add_user recipe * Testing Refactor & macos_user resource - Create new testing cookbook that contains tests for both plistbuddy and macos_user resources. The hope here is to have a single testing cookbook that contains multiple suites and suite testing variations - Create new macos_user resource - contains single boolean 'true' settings for autologin and admin user. Still work to be done for admin user and all steps that need to be taken to acheive the task. * fix method call * fix another method call * user native ruby File class and not overriden * fix some minor issues with resource; add kcpassword file * Add OG Ruby kcpassword file helper module * slightly different approach for Kcpassword module * passing test * Fix up kcpassword library module, smoke tests - Modify Kcpassword helper module to use a method for magic bits. This isn't ideal, but it works for now - Update smoke tests so that john_jr's group ID is 20. This may not be correct, but setting as 20 until it is further investigated * opportunistic refactor of keep_awake recipe * Refactor testing cookbook layout - Consolodate testing suites into single default suite - Add tests for keep_awake recipe - Use more common examples to test PlistBuddy resource * move xcode test to test cookbook * Opportunistic bug fix for plistbuddy resource - Previously, the plistbuddy resource did not allow any keys with spaces unless they were used in the value itself. Now, you can use keys with spaces in the value property without needing to double-quote it - Also, fix the PlistBuddy executable string to be correct * revert kcpassword.rb helper to a671164 * fix incorrect PlistBuddy data type name * Fix kcpassword.rb and update plistbuddy UTs * Extract disabling screen saver to plistbuddy - Also, skip Xcode test temporarily * PlistBuddy idempotence - Remove systemsetup and pmset resource calls in keep_awake until they are made idempotent * update test and plist name * Implement binary plist conversion - Changes to binary plists via PlistBuddy must be converted back to binary since the change implicitly converts the file to xml. This change contains logic to convert back to binary if the file is detected to be binary in the first place. * attempts at idempotence using chef helper methods * early commit to get it on the remote * implement logic for plist return type to ruby data type * Add floating type value support A wild FAILING TEST appeared! ... HANKO used TDD! It's super effective! * move function * real idempotence! * passing all unit tests * update test cookbook name * update new_users integration tests * systemsetup idempotence * all smoke and unit tests passing * quick fix for timezone bug * remove kcpassword file as it is no longer needed * update path for test cookbook to be default repo name * Rename keep_awake_spec.rb to keep_awake_test.rb * Rename preferences_spec.rb to preferences_test.rb * Rename new_users_spec.rb to new_users_test.rb * fix typo * Use relative path for macos cookbook source * Improve readability of relative path for macos cookbook source * Bump version * Addressing changes in Pull Request #14 - Fix bug where screensaver was not properly being disabled, update tests accordingly - Rename plistbuddy resource to plist, including all related files and callers - Rename kcpassword helper to macos_user to match helper -> resource convention; fix top level namespace to be MacOS - Correctly name recipe unit tests - Implement plist resource into disable_software_updates.rb recipe - Add disable_software_updates.rb recipe to default kitchen suite and appropriate smoke tests - Remove relatively useless logic in systemsetup value property coercion * Implement binary plist conversion * Fix unit test and apply the Law of Demeter * update helper pattern to match current standard; include everywhere * remove helper reference in Xcode resource * bump version * update Xcode attribute to latest * extract xcode smoke tests to a different suite * update xcversion path for simulators test * update namespace again * refactor XcodeHelper modules in XCVersion, Xcode, and XCVersion modules updated methods to simplify site calls in resource * updated method calls for new modules * bump version * extract xcversion module to separate library file * add missing macos module * include parent module macos instead of child for xcode and xcversion * update available_simulator_versions to new method * bump version * add platform-specific smoke test for xcode * add xcode test recipe * update kitchen with xcode suite * refactor simulator method to call it's own available list of simulators * use new simulator method to find highest available version * move xcode prep work into the setup action * clear kitchen customizations * lazily evalutate ios simulator property * move lazy evaluation to simulator action in xcode resource * revert lazy execution * warn and retry if simulator list is empty * restore spacing * more whitespace * refactor highest_semantic_simulator method into class, smaller methods * implement simulator class * add more xcversion command methods * implement xcversion command methods * implement command methods correctly * add list methods for xcversion * implement xcversion list methods * implement install xcode correctly * reorder methods * add method to list installed xcodes * use more descriptive name for 'command' method * move where the space lives * implement installed xcodes command * implement install xcodes correctly * disable downloads prior to disabling software update check * Renamed name to device_name * Change name.rb to machine_name.rb to be similar with the apex automation cookbook. Instances of name are also all changed to machine_name. * Add new test recipe and smoke test for machine_name. * add disable-swu test suite * Bump up cookbook version numbers. * update kitchen test suite order, remove standalone swu testing * add sleep for El Capitan platform to avoid race condition this occurs when integrated with the macos-user test recipe * Improve README/Documentation (#23) * implement build definition badge and minor tweaks * Add descriptions and attribute lists for recipes * Remove 'description' label from recipe names * Bump version, add documentation dir * Fix up the last commit * Separate 10.12 and 10.13 build status * Add table for build status * Add plist resource documentation * Add Xcode documentation * bump version
2017-12-14 22:03:03 +03:00
macOS Cookbook
==============
2017-06-01 00:31:21 +03:00
Release plist and macos_user resources, new Xcode libraries, test cookbook and documentation. (#24) * first commit plistbuddy * all recipe/plist in macos * extract plistbuddy to resource * Straighten out unit tests - Correctly include modules - Correctly setup spec_helper - Correct unit test / respec setup * first passing test * add more data type tests * Most data types passing - Boolean values are working - Array and data type values are not - PlistBuddy "commands" (add, print, etc.) are passing * More testing - Skip Array and Dict types as their implementation will be more complicated - Add test for float type - Put the correct type in the test description - Cookstyle changes * PlistBuddy and testing update - Add separate test cookbook for PlistBuddy resource - Add kitchen.yml for the above purpose - Modify and update plistbuddy resource/helpers * remove extra newline * add metadata file * edit metadata; add Berksfile * move Berksfile to correct location * add testing requirements for berks vendor * move kitchen file * Converge passing in test cookbook - Opportunistic cleanup of xcode test - some temp debugging info in resource definition - Rename name_property to command so as to not override action * Itempotence - Removed 'bool' prefix from boolean types, as that was somehow causing issues - Changed name_property to the path and removed that property - Use actual actions in the resource for the PlistBuddy commands * Fix false positive? - Not sure how the previous test was passing previously, but I adjusted the boolean value for the BazEntry test so that the signature input matches the output * Add logic for adding a value - The data type should only be used when adding a value to a plist. Otherwise, we don't need to use the data type * remove debugging; fix smoke tests * remove .kitchen.yml * bump version to 0.8.5 * unskip ChefSpec tests - they're passing * mark args_formatter as private method * Feature/macos user (#14) * first commit add_user recipe * Testing Refactor & macos_user resource - Create new testing cookbook that contains tests for both plistbuddy and macos_user resources. The hope here is to have a single testing cookbook that contains multiple suites and suite testing variations - Create new macos_user resource - contains single boolean 'true' settings for autologin and admin user. Still work to be done for admin user and all steps that need to be taken to acheive the task. * fix method call * fix another method call * user native ruby File class and not overriden * fix some minor issues with resource; add kcpassword file * Add OG Ruby kcpassword file helper module * slightly different approach for Kcpassword module * passing test * Fix up kcpassword library module, smoke tests - Modify Kcpassword helper module to use a method for magic bits. This isn't ideal, but it works for now - Update smoke tests so that john_jr's group ID is 20. This may not be correct, but setting as 20 until it is further investigated * opportunistic refactor of keep_awake recipe * Refactor testing cookbook layout - Consolodate testing suites into single default suite - Add tests for keep_awake recipe - Use more common examples to test PlistBuddy resource * move xcode test to test cookbook * Opportunistic bug fix for plistbuddy resource - Previously, the plistbuddy resource did not allow any keys with spaces unless they were used in the value itself. Now, you can use keys with spaces in the value property without needing to double-quote it - Also, fix the PlistBuddy executable string to be correct * revert kcpassword.rb helper to a671164 * fix incorrect PlistBuddy data type name * Fix kcpassword.rb and update plistbuddy UTs * Extract disabling screen saver to plistbuddy - Also, skip Xcode test temporarily * PlistBuddy idempotence - Remove systemsetup and pmset resource calls in keep_awake until they are made idempotent * update test and plist name * Implement binary plist conversion - Changes to binary plists via PlistBuddy must be converted back to binary since the change implicitly converts the file to xml. This change contains logic to convert back to binary if the file is detected to be binary in the first place. * attempts at idempotence using chef helper methods * early commit to get it on the remote * implement logic for plist return type to ruby data type * Add floating type value support A wild FAILING TEST appeared! ... HANKO used TDD! It's super effective! * move function * real idempotence! * passing all unit tests * update test cookbook name * update new_users integration tests * systemsetup idempotence * all smoke and unit tests passing * quick fix for timezone bug * remove kcpassword file as it is no longer needed * update path for test cookbook to be default repo name * Rename keep_awake_spec.rb to keep_awake_test.rb * Rename preferences_spec.rb to preferences_test.rb * Rename new_users_spec.rb to new_users_test.rb * fix typo * Use relative path for macos cookbook source * Improve readability of relative path for macos cookbook source * Bump version * Addressing changes in Pull Request #14 - Fix bug where screensaver was not properly being disabled, update tests accordingly - Rename plistbuddy resource to plist, including all related files and callers - Rename kcpassword helper to macos_user to match helper -> resource convention; fix top level namespace to be MacOS - Correctly name recipe unit tests - Implement plist resource into disable_software_updates.rb recipe - Add disable_software_updates.rb recipe to default kitchen suite and appropriate smoke tests - Remove relatively useless logic in systemsetup value property coercion * Implement binary plist conversion * Fix unit test and apply the Law of Demeter * update helper pattern to match current standard; include everywhere * remove helper reference in Xcode resource * bump version * update Xcode attribute to latest * extract xcode smoke tests to a different suite * update xcversion path for simulators test * update namespace again * refactor XcodeHelper modules in XCVersion, Xcode, and XCVersion modules updated methods to simplify site calls in resource * updated method calls for new modules * bump version * extract xcversion module to separate library file * add missing macos module * include parent module macos instead of child for xcode and xcversion * update available_simulator_versions to new method * bump version * add platform-specific smoke test for xcode * add xcode test recipe * update kitchen with xcode suite * refactor simulator method to call it's own available list of simulators * use new simulator method to find highest available version * move xcode prep work into the setup action * clear kitchen customizations * lazily evalutate ios simulator property * move lazy evaluation to simulator action in xcode resource * revert lazy execution * warn and retry if simulator list is empty * restore spacing * more whitespace * refactor highest_semantic_simulator method into class, smaller methods * implement simulator class * add more xcversion command methods * implement xcversion command methods * implement command methods correctly * add list methods for xcversion * implement xcversion list methods * implement install xcode correctly * reorder methods * add method to list installed xcodes * use more descriptive name for 'command' method * move where the space lives * implement installed xcodes command * implement install xcodes correctly * disable downloads prior to disabling software update check * Renamed name to device_name * Change name.rb to machine_name.rb to be similar with the apex automation cookbook. Instances of name are also all changed to machine_name. * Add new test recipe and smoke test for machine_name. * add disable-swu test suite * Bump up cookbook version numbers. * update kitchen test suite order, remove standalone swu testing * add sleep for El Capitan platform to avoid race condition this occurs when integrated with the macos-user test recipe * Improve README/Documentation (#23) * implement build definition badge and minor tweaks * Add descriptions and attribute lists for recipes * Remove 'description' label from recipe names * Bump version, add documentation dir * Fix up the last commit * Separate 10.12 and 10.13 build status * Add table for build status * Add plist resource documentation * Add Xcode documentation * bump version
2017-12-14 22:03:03 +03:00
The macOS cookbook is a Chef library cookbook that provides resources for configuring
and provisioning macOS. Additionally, it provides recipes that implement common
2018-01-28 05:26:34 +03:00
use-cases of the macOS cookbook's resources.
- [Chef Requirements](#chef-requirements)
- [Supported OS Versions](#supported-os-versions)
- [Attributes](#attributes)
- [Recipes](#recipes)
- [Data Bags](#data-bags)
- [Resources](#resources)
Chef Requirements
-----------------
Currently, we've only tested the macOS cookbook using **Chef 13**. We do intend to implement
better test coverage in order to support more versions of Chef. Let us know
if you find issues with previous versions and we will do our best to resolve them.
Release plist and macos_user resources, new Xcode libraries, test cookbook and documentation. (#24) * first commit plistbuddy * all recipe/plist in macos * extract plistbuddy to resource * Straighten out unit tests - Correctly include modules - Correctly setup spec_helper - Correct unit test / respec setup * first passing test * add more data type tests * Most data types passing - Boolean values are working - Array and data type values are not - PlistBuddy "commands" (add, print, etc.) are passing * More testing - Skip Array and Dict types as their implementation will be more complicated - Add test for float type - Put the correct type in the test description - Cookstyle changes * PlistBuddy and testing update - Add separate test cookbook for PlistBuddy resource - Add kitchen.yml for the above purpose - Modify and update plistbuddy resource/helpers * remove extra newline * add metadata file * edit metadata; add Berksfile * move Berksfile to correct location * add testing requirements for berks vendor * move kitchen file * Converge passing in test cookbook - Opportunistic cleanup of xcode test - some temp debugging info in resource definition - Rename name_property to command so as to not override action * Itempotence - Removed 'bool' prefix from boolean types, as that was somehow causing issues - Changed name_property to the path and removed that property - Use actual actions in the resource for the PlistBuddy commands * Fix false positive? - Not sure how the previous test was passing previously, but I adjusted the boolean value for the BazEntry test so that the signature input matches the output * Add logic for adding a value - The data type should only be used when adding a value to a plist. Otherwise, we don't need to use the data type * remove debugging; fix smoke tests * remove .kitchen.yml * bump version to 0.8.5 * unskip ChefSpec tests - they're passing * mark args_formatter as private method * Feature/macos user (#14) * first commit add_user recipe * Testing Refactor & macos_user resource - Create new testing cookbook that contains tests for both plistbuddy and macos_user resources. The hope here is to have a single testing cookbook that contains multiple suites and suite testing variations - Create new macos_user resource - contains single boolean 'true' settings for autologin and admin user. Still work to be done for admin user and all steps that need to be taken to acheive the task. * fix method call * fix another method call * user native ruby File class and not overriden * fix some minor issues with resource; add kcpassword file * Add OG Ruby kcpassword file helper module * slightly different approach for Kcpassword module * passing test * Fix up kcpassword library module, smoke tests - Modify Kcpassword helper module to use a method for magic bits. This isn't ideal, but it works for now - Update smoke tests so that john_jr's group ID is 20. This may not be correct, but setting as 20 until it is further investigated * opportunistic refactor of keep_awake recipe * Refactor testing cookbook layout - Consolodate testing suites into single default suite - Add tests for keep_awake recipe - Use more common examples to test PlistBuddy resource * move xcode test to test cookbook * Opportunistic bug fix for plistbuddy resource - Previously, the plistbuddy resource did not allow any keys with spaces unless they were used in the value itself. Now, you can use keys with spaces in the value property without needing to double-quote it - Also, fix the PlistBuddy executable string to be correct * revert kcpassword.rb helper to a671164 * fix incorrect PlistBuddy data type name * Fix kcpassword.rb and update plistbuddy UTs * Extract disabling screen saver to plistbuddy - Also, skip Xcode test temporarily * PlistBuddy idempotence - Remove systemsetup and pmset resource calls in keep_awake until they are made idempotent * update test and plist name * Implement binary plist conversion - Changes to binary plists via PlistBuddy must be converted back to binary since the change implicitly converts the file to xml. This change contains logic to convert back to binary if the file is detected to be binary in the first place. * attempts at idempotence using chef helper methods * early commit to get it on the remote * implement logic for plist return type to ruby data type * Add floating type value support A wild FAILING TEST appeared! ... HANKO used TDD! It's super effective! * move function * real idempotence! * passing all unit tests * update test cookbook name * update new_users integration tests * systemsetup idempotence * all smoke and unit tests passing * quick fix for timezone bug * remove kcpassword file as it is no longer needed * update path for test cookbook to be default repo name * Rename keep_awake_spec.rb to keep_awake_test.rb * Rename preferences_spec.rb to preferences_test.rb * Rename new_users_spec.rb to new_users_test.rb * fix typo * Use relative path for macos cookbook source * Improve readability of relative path for macos cookbook source * Bump version * Addressing changes in Pull Request #14 - Fix bug where screensaver was not properly being disabled, update tests accordingly - Rename plistbuddy resource to plist, including all related files and callers - Rename kcpassword helper to macos_user to match helper -> resource convention; fix top level namespace to be MacOS - Correctly name recipe unit tests - Implement plist resource into disable_software_updates.rb recipe - Add disable_software_updates.rb recipe to default kitchen suite and appropriate smoke tests - Remove relatively useless logic in systemsetup value property coercion * Implement binary plist conversion * Fix unit test and apply the Law of Demeter * update helper pattern to match current standard; include everywhere * remove helper reference in Xcode resource * bump version * update Xcode attribute to latest * extract xcode smoke tests to a different suite * update xcversion path for simulators test * update namespace again * refactor XcodeHelper modules in XCVersion, Xcode, and XCVersion modules updated methods to simplify site calls in resource * updated method calls for new modules * bump version * extract xcversion module to separate library file * add missing macos module * include parent module macos instead of child for xcode and xcversion * update available_simulator_versions to new method * bump version * add platform-specific smoke test for xcode * add xcode test recipe * update kitchen with xcode suite * refactor simulator method to call it's own available list of simulators * use new simulator method to find highest available version * move xcode prep work into the setup action * clear kitchen customizations * lazily evalutate ios simulator property * move lazy evaluation to simulator action in xcode resource * revert lazy execution * warn and retry if simulator list is empty * restore spacing * more whitespace * refactor highest_semantic_simulator method into class, smaller methods * implement simulator class * add more xcversion command methods * implement xcversion command methods * implement command methods correctly * add list methods for xcversion * implement xcversion list methods * implement install xcode correctly * reorder methods * add method to list installed xcodes * use more descriptive name for 'command' method * move where the space lives * implement installed xcodes command * implement install xcodes correctly * disable downloads prior to disabling software update check * Renamed name to device_name * Change name.rb to machine_name.rb to be similar with the apex automation cookbook. Instances of name are also all changed to machine_name. * Add new test recipe and smoke test for machine_name. * add disable-swu test suite * Bump up cookbook version numbers. * update kitchen test suite order, remove standalone swu testing * add sleep for El Capitan platform to avoid race condition this occurs when integrated with the macos-user test recipe * Improve README/Documentation (#23) * implement build definition badge and minor tweaks * Add descriptions and attribute lists for recipes * Remove 'description' label from recipe names * Bump version, add documentation dir * Fix up the last commit * Separate 10.12 and 10.13 build status * Add table for build status * Add plist resource documentation * Add Xcode documentation * bump version
2017-12-14 22:03:03 +03:00
Supported OS Versions
---------------------
2017-06-01 00:31:21 +03:00
| OS X El Capitan 10.11 | macOS Sierra 10.12 | macOS High Sierra 10.13 |
|:---------------------:|:------------------:|:-----------------------:|
| ![build-status-1011](https://office.visualstudio.com/_apis/public/build/definitions/59d72877-1cea-4eb6-9d06-66716573631a/2302/badge) | ![build-status-1012](https://office.visualstudio.com/_apis/public/build/definitions/59d72877-1cea-4eb6-9d06-66716573631a/2140/badge) | ![build-status-1013](https://office.visualstudio.com/_apis/public/build/definitions/59d72877-1cea-4eb6-9d06-66716573631a/2143/badge) |
Release plist and macos_user resources, new Xcode libraries, test cookbook and documentation. (#24) * first commit plistbuddy * all recipe/plist in macos * extract plistbuddy to resource * Straighten out unit tests - Correctly include modules - Correctly setup spec_helper - Correct unit test / respec setup * first passing test * add more data type tests * Most data types passing - Boolean values are working - Array and data type values are not - PlistBuddy "commands" (add, print, etc.) are passing * More testing - Skip Array and Dict types as their implementation will be more complicated - Add test for float type - Put the correct type in the test description - Cookstyle changes * PlistBuddy and testing update - Add separate test cookbook for PlistBuddy resource - Add kitchen.yml for the above purpose - Modify and update plistbuddy resource/helpers * remove extra newline * add metadata file * edit metadata; add Berksfile * move Berksfile to correct location * add testing requirements for berks vendor * move kitchen file * Converge passing in test cookbook - Opportunistic cleanup of xcode test - some temp debugging info in resource definition - Rename name_property to command so as to not override action * Itempotence - Removed 'bool' prefix from boolean types, as that was somehow causing issues - Changed name_property to the path and removed that property - Use actual actions in the resource for the PlistBuddy commands * Fix false positive? - Not sure how the previous test was passing previously, but I adjusted the boolean value for the BazEntry test so that the signature input matches the output * Add logic for adding a value - The data type should only be used when adding a value to a plist. Otherwise, we don't need to use the data type * remove debugging; fix smoke tests * remove .kitchen.yml * bump version to 0.8.5 * unskip ChefSpec tests - they're passing * mark args_formatter as private method * Feature/macos user (#14) * first commit add_user recipe * Testing Refactor & macos_user resource - Create new testing cookbook that contains tests for both plistbuddy and macos_user resources. The hope here is to have a single testing cookbook that contains multiple suites and suite testing variations - Create new macos_user resource - contains single boolean 'true' settings for autologin and admin user. Still work to be done for admin user and all steps that need to be taken to acheive the task. * fix method call * fix another method call * user native ruby File class and not overriden * fix some minor issues with resource; add kcpassword file * Add OG Ruby kcpassword file helper module * slightly different approach for Kcpassword module * passing test * Fix up kcpassword library module, smoke tests - Modify Kcpassword helper module to use a method for magic bits. This isn't ideal, but it works for now - Update smoke tests so that john_jr's group ID is 20. This may not be correct, but setting as 20 until it is further investigated * opportunistic refactor of keep_awake recipe * Refactor testing cookbook layout - Consolodate testing suites into single default suite - Add tests for keep_awake recipe - Use more common examples to test PlistBuddy resource * move xcode test to test cookbook * Opportunistic bug fix for plistbuddy resource - Previously, the plistbuddy resource did not allow any keys with spaces unless they were used in the value itself. Now, you can use keys with spaces in the value property without needing to double-quote it - Also, fix the PlistBuddy executable string to be correct * revert kcpassword.rb helper to a671164 * fix incorrect PlistBuddy data type name * Fix kcpassword.rb and update plistbuddy UTs * Extract disabling screen saver to plistbuddy - Also, skip Xcode test temporarily * PlistBuddy idempotence - Remove systemsetup and pmset resource calls in keep_awake until they are made idempotent * update test and plist name * Implement binary plist conversion - Changes to binary plists via PlistBuddy must be converted back to binary since the change implicitly converts the file to xml. This change contains logic to convert back to binary if the file is detected to be binary in the first place. * attempts at idempotence using chef helper methods * early commit to get it on the remote * implement logic for plist return type to ruby data type * Add floating type value support A wild FAILING TEST appeared! ... HANKO used TDD! It's super effective! * move function * real idempotence! * passing all unit tests * update test cookbook name * update new_users integration tests * systemsetup idempotence * all smoke and unit tests passing * quick fix for timezone bug * remove kcpassword file as it is no longer needed * update path for test cookbook to be default repo name * Rename keep_awake_spec.rb to keep_awake_test.rb * Rename preferences_spec.rb to preferences_test.rb * Rename new_users_spec.rb to new_users_test.rb * fix typo * Use relative path for macos cookbook source * Improve readability of relative path for macos cookbook source * Bump version * Addressing changes in Pull Request #14 - Fix bug where screensaver was not properly being disabled, update tests accordingly - Rename plistbuddy resource to plist, including all related files and callers - Rename kcpassword helper to macos_user to match helper -> resource convention; fix top level namespace to be MacOS - Correctly name recipe unit tests - Implement plist resource into disable_software_updates.rb recipe - Add disable_software_updates.rb recipe to default kitchen suite and appropriate smoke tests - Remove relatively useless logic in systemsetup value property coercion * Implement binary plist conversion * Fix unit test and apply the Law of Demeter * update helper pattern to match current standard; include everywhere * remove helper reference in Xcode resource * bump version * update Xcode attribute to latest * extract xcode smoke tests to a different suite * update xcversion path for simulators test * update namespace again * refactor XcodeHelper modules in XCVersion, Xcode, and XCVersion modules updated methods to simplify site calls in resource * updated method calls for new modules * bump version * extract xcversion module to separate library file * add missing macos module * include parent module macos instead of child for xcode and xcversion * update available_simulator_versions to new method * bump version * add platform-specific smoke test for xcode * add xcode test recipe * update kitchen with xcode suite * refactor simulator method to call it's own available list of simulators * use new simulator method to find highest available version * move xcode prep work into the setup action * clear kitchen customizations * lazily evalutate ios simulator property * move lazy evaluation to simulator action in xcode resource * revert lazy execution * warn and retry if simulator list is empty * restore spacing * more whitespace * refactor highest_semantic_simulator method into class, smaller methods * implement simulator class * add more xcversion command methods * implement xcversion command methods * implement command methods correctly * add list methods for xcversion * implement xcversion list methods * implement install xcode correctly * reorder methods * add method to list installed xcodes * use more descriptive name for 'command' method * move where the space lives * implement installed xcodes command * implement install xcodes correctly * disable downloads prior to disabling software update check * Renamed name to device_name * Change name.rb to machine_name.rb to be similar with the apex automation cookbook. Instances of name are also all changed to machine_name. * Add new test recipe and smoke test for machine_name. * add disable-swu test suite * Bump up cookbook version numbers. * update kitchen test suite order, remove standalone swu testing * add sleep for El Capitan platform to avoid race condition this occurs when integrated with the macos-user test recipe * Improve README/Documentation (#23) * implement build definition badge and minor tweaks * Add descriptions and attribute lists for recipes * Remove 'description' label from recipe names * Bump version, add documentation dir * Fix up the last commit * Separate 10.12 and 10.13 build status * Add table for build status * Add plist resource documentation * Add Xcode documentation * bump version
2017-12-14 22:03:03 +03:00
Attributes
----------
2017-06-08 00:48:06 +03:00
### Admin User and Password
2017-06-08 00:48:06 +03:00
```ruby
node['macos']['admin_user'] = 'vagrant'
node['macos']['admin_password'] = 'vagrant'
2017-06-08 00:48:06 +03:00
```
2017-06-08 01:41:54 +03:00
Each of these attributes defaults to vagrant since our resources are developed
Release plist and macos_user resources, new Xcode libraries, test cookbook and documentation. (#24) * first commit plistbuddy * all recipe/plist in macos * extract plistbuddy to resource * Straighten out unit tests - Correctly include modules - Correctly setup spec_helper - Correct unit test / respec setup * first passing test * add more data type tests * Most data types passing - Boolean values are working - Array and data type values are not - PlistBuddy "commands" (add, print, etc.) are passing * More testing - Skip Array and Dict types as their implementation will be more complicated - Add test for float type - Put the correct type in the test description - Cookstyle changes * PlistBuddy and testing update - Add separate test cookbook for PlistBuddy resource - Add kitchen.yml for the above purpose - Modify and update plistbuddy resource/helpers * remove extra newline * add metadata file * edit metadata; add Berksfile * move Berksfile to correct location * add testing requirements for berks vendor * move kitchen file * Converge passing in test cookbook - Opportunistic cleanup of xcode test - some temp debugging info in resource definition - Rename name_property to command so as to not override action * Itempotence - Removed 'bool' prefix from boolean types, as that was somehow causing issues - Changed name_property to the path and removed that property - Use actual actions in the resource for the PlistBuddy commands * Fix false positive? - Not sure how the previous test was passing previously, but I adjusted the boolean value for the BazEntry test so that the signature input matches the output * Add logic for adding a value - The data type should only be used when adding a value to a plist. Otherwise, we don't need to use the data type * remove debugging; fix smoke tests * remove .kitchen.yml * bump version to 0.8.5 * unskip ChefSpec tests - they're passing * mark args_formatter as private method * Feature/macos user (#14) * first commit add_user recipe * Testing Refactor & macos_user resource - Create new testing cookbook that contains tests for both plistbuddy and macos_user resources. The hope here is to have a single testing cookbook that contains multiple suites and suite testing variations - Create new macos_user resource - contains single boolean 'true' settings for autologin and admin user. Still work to be done for admin user and all steps that need to be taken to acheive the task. * fix method call * fix another method call * user native ruby File class and not overriden * fix some minor issues with resource; add kcpassword file * Add OG Ruby kcpassword file helper module * slightly different approach for Kcpassword module * passing test * Fix up kcpassword library module, smoke tests - Modify Kcpassword helper module to use a method for magic bits. This isn't ideal, but it works for now - Update smoke tests so that john_jr's group ID is 20. This may not be correct, but setting as 20 until it is further investigated * opportunistic refactor of keep_awake recipe * Refactor testing cookbook layout - Consolodate testing suites into single default suite - Add tests for keep_awake recipe - Use more common examples to test PlistBuddy resource * move xcode test to test cookbook * Opportunistic bug fix for plistbuddy resource - Previously, the plistbuddy resource did not allow any keys with spaces unless they were used in the value itself. Now, you can use keys with spaces in the value property without needing to double-quote it - Also, fix the PlistBuddy executable string to be correct * revert kcpassword.rb helper to a671164 * fix incorrect PlistBuddy data type name * Fix kcpassword.rb and update plistbuddy UTs * Extract disabling screen saver to plistbuddy - Also, skip Xcode test temporarily * PlistBuddy idempotence - Remove systemsetup and pmset resource calls in keep_awake until they are made idempotent * update test and plist name * Implement binary plist conversion - Changes to binary plists via PlistBuddy must be converted back to binary since the change implicitly converts the file to xml. This change contains logic to convert back to binary if the file is detected to be binary in the first place. * attempts at idempotence using chef helper methods * early commit to get it on the remote * implement logic for plist return type to ruby data type * Add floating type value support A wild FAILING TEST appeared! ... HANKO used TDD! It's super effective! * move function * real idempotence! * passing all unit tests * update test cookbook name * update new_users integration tests * systemsetup idempotence * all smoke and unit tests passing * quick fix for timezone bug * remove kcpassword file as it is no longer needed * update path for test cookbook to be default repo name * Rename keep_awake_spec.rb to keep_awake_test.rb * Rename preferences_spec.rb to preferences_test.rb * Rename new_users_spec.rb to new_users_test.rb * fix typo * Use relative path for macos cookbook source * Improve readability of relative path for macos cookbook source * Bump version * Addressing changes in Pull Request #14 - Fix bug where screensaver was not properly being disabled, update tests accordingly - Rename plistbuddy resource to plist, including all related files and callers - Rename kcpassword helper to macos_user to match helper -> resource convention; fix top level namespace to be MacOS - Correctly name recipe unit tests - Implement plist resource into disable_software_updates.rb recipe - Add disable_software_updates.rb recipe to default kitchen suite and appropriate smoke tests - Remove relatively useless logic in systemsetup value property coercion * Implement binary plist conversion * Fix unit test and apply the Law of Demeter * update helper pattern to match current standard; include everywhere * remove helper reference in Xcode resource * bump version * update Xcode attribute to latest * extract xcode smoke tests to a different suite * update xcversion path for simulators test * update namespace again * refactor XcodeHelper modules in XCVersion, Xcode, and XCVersion modules updated methods to simplify site calls in resource * updated method calls for new modules * bump version * extract xcversion module to separate library file * add missing macos module * include parent module macos instead of child for xcode and xcversion * update available_simulator_versions to new method * bump version * add platform-specific smoke test for xcode * add xcode test recipe * update kitchen with xcode suite * refactor simulator method to call it's own available list of simulators * use new simulator method to find highest available version * move xcode prep work into the setup action * clear kitchen customizations * lazily evalutate ios simulator property * move lazy evaluation to simulator action in xcode resource * revert lazy execution * warn and retry if simulator list is empty * restore spacing * more whitespace * refactor highest_semantic_simulator method into class, smaller methods * implement simulator class * add more xcversion command methods * implement xcversion command methods * implement command methods correctly * add list methods for xcversion * implement xcversion list methods * implement install xcode correctly * reorder methods * add method to list installed xcodes * use more descriptive name for 'command' method * move where the space lives * implement installed xcodes command * implement install xcodes correctly * disable downloads prior to disabling software update check * Renamed name to device_name * Change name.rb to machine_name.rb to be similar with the apex automation cookbook. Instances of name are also all changed to machine_name. * Add new test recipe and smoke test for machine_name. * add disable-swu test suite * Bump up cookbook version numbers. * update kitchen test suite order, remove standalone swu testing * add sleep for El Capitan platform to avoid race condition this occurs when integrated with the macos-user test recipe * Improve README/Documentation (#23) * implement build definition badge and minor tweaks * Add descriptions and attribute lists for recipes * Remove 'description' label from recipe names * Bump version, add documentation dir * Fix up the last commit * Separate 10.12 and 10.13 build status * Add table for build status * Add plist resource documentation * Add Xcode documentation * bump version
2017-12-14 22:03:03 +03:00
with the Vagrant paradigm. In other words, the user and password declared here
should be an admin user with passwordless super-user rights.
Recipes
-------
### Disable Software Updates
Disables automatic checking and downloading of software updates.
**Usage:** `include_recipe 'macos::disable_software_updates'`
Release plist and macos_user resources, new Xcode libraries, test cookbook and documentation. (#24) * first commit plistbuddy * all recipe/plist in macos * extract plistbuddy to resource * Straighten out unit tests - Correctly include modules - Correctly setup spec_helper - Correct unit test / respec setup * first passing test * add more data type tests * Most data types passing - Boolean values are working - Array and data type values are not - PlistBuddy "commands" (add, print, etc.) are passing * More testing - Skip Array and Dict types as their implementation will be more complicated - Add test for float type - Put the correct type in the test description - Cookstyle changes * PlistBuddy and testing update - Add separate test cookbook for PlistBuddy resource - Add kitchen.yml for the above purpose - Modify and update plistbuddy resource/helpers * remove extra newline * add metadata file * edit metadata; add Berksfile * move Berksfile to correct location * add testing requirements for berks vendor * move kitchen file * Converge passing in test cookbook - Opportunistic cleanup of xcode test - some temp debugging info in resource definition - Rename name_property to command so as to not override action * Itempotence - Removed 'bool' prefix from boolean types, as that was somehow causing issues - Changed name_property to the path and removed that property - Use actual actions in the resource for the PlistBuddy commands * Fix false positive? - Not sure how the previous test was passing previously, but I adjusted the boolean value for the BazEntry test so that the signature input matches the output * Add logic for adding a value - The data type should only be used when adding a value to a plist. Otherwise, we don't need to use the data type * remove debugging; fix smoke tests * remove .kitchen.yml * bump version to 0.8.5 * unskip ChefSpec tests - they're passing * mark args_formatter as private method * Feature/macos user (#14) * first commit add_user recipe * Testing Refactor & macos_user resource - Create new testing cookbook that contains tests for both plistbuddy and macos_user resources. The hope here is to have a single testing cookbook that contains multiple suites and suite testing variations - Create new macos_user resource - contains single boolean 'true' settings for autologin and admin user. Still work to be done for admin user and all steps that need to be taken to acheive the task. * fix method call * fix another method call * user native ruby File class and not overriden * fix some minor issues with resource; add kcpassword file * Add OG Ruby kcpassword file helper module * slightly different approach for Kcpassword module * passing test * Fix up kcpassword library module, smoke tests - Modify Kcpassword helper module to use a method for magic bits. This isn't ideal, but it works for now - Update smoke tests so that john_jr's group ID is 20. This may not be correct, but setting as 20 until it is further investigated * opportunistic refactor of keep_awake recipe * Refactor testing cookbook layout - Consolodate testing suites into single default suite - Add tests for keep_awake recipe - Use more common examples to test PlistBuddy resource * move xcode test to test cookbook * Opportunistic bug fix for plistbuddy resource - Previously, the plistbuddy resource did not allow any keys with spaces unless they were used in the value itself. Now, you can use keys with spaces in the value property without needing to double-quote it - Also, fix the PlistBuddy executable string to be correct * revert kcpassword.rb helper to a671164 * fix incorrect PlistBuddy data type name * Fix kcpassword.rb and update plistbuddy UTs * Extract disabling screen saver to plistbuddy - Also, skip Xcode test temporarily * PlistBuddy idempotence - Remove systemsetup and pmset resource calls in keep_awake until they are made idempotent * update test and plist name * Implement binary plist conversion - Changes to binary plists via PlistBuddy must be converted back to binary since the change implicitly converts the file to xml. This change contains logic to convert back to binary if the file is detected to be binary in the first place. * attempts at idempotence using chef helper methods * early commit to get it on the remote * implement logic for plist return type to ruby data type * Add floating type value support A wild FAILING TEST appeared! ... HANKO used TDD! It's super effective! * move function * real idempotence! * passing all unit tests * update test cookbook name * update new_users integration tests * systemsetup idempotence * all smoke and unit tests passing * quick fix for timezone bug * remove kcpassword file as it is no longer needed * update path for test cookbook to be default repo name * Rename keep_awake_spec.rb to keep_awake_test.rb * Rename preferences_spec.rb to preferences_test.rb * Rename new_users_spec.rb to new_users_test.rb * fix typo * Use relative path for macos cookbook source * Improve readability of relative path for macos cookbook source * Bump version * Addressing changes in Pull Request #14 - Fix bug where screensaver was not properly being disabled, update tests accordingly - Rename plistbuddy resource to plist, including all related files and callers - Rename kcpassword helper to macos_user to match helper -> resource convention; fix top level namespace to be MacOS - Correctly name recipe unit tests - Implement plist resource into disable_software_updates.rb recipe - Add disable_software_updates.rb recipe to default kitchen suite and appropriate smoke tests - Remove relatively useless logic in systemsetup value property coercion * Implement binary plist conversion * Fix unit test and apply the Law of Demeter * update helper pattern to match current standard; include everywhere * remove helper reference in Xcode resource * bump version * update Xcode attribute to latest * extract xcode smoke tests to a different suite * update xcversion path for simulators test * update namespace again * refactor XcodeHelper modules in XCVersion, Xcode, and XCVersion modules updated methods to simplify site calls in resource * updated method calls for new modules * bump version * extract xcversion module to separate library file * add missing macos module * include parent module macos instead of child for xcode and xcversion * update available_simulator_versions to new method * bump version * add platform-specific smoke test for xcode * add xcode test recipe * update kitchen with xcode suite * refactor simulator method to call it's own available list of simulators * use new simulator method to find highest available version * move xcode prep work into the setup action * clear kitchen customizations * lazily evalutate ios simulator property * move lazy evaluation to simulator action in xcode resource * revert lazy execution * warn and retry if simulator list is empty * restore spacing * more whitespace * refactor highest_semantic_simulator method into class, smaller methods * implement simulator class * add more xcversion command methods * implement xcversion command methods * implement command methods correctly * add list methods for xcversion * implement xcversion list methods * implement install xcode correctly * reorder methods * add method to list installed xcodes * use more descriptive name for 'command' method * move where the space lives * implement installed xcodes command * implement install xcodes correctly * disable downloads prior to disabling software update check * Renamed name to device_name * Change name.rb to machine_name.rb to be similar with the apex automation cookbook. Instances of name are also all changed to machine_name. * Add new test recipe and smoke test for machine_name. * add disable-swu test suite * Bump up cookbook version numbers. * update kitchen test suite order, remove standalone swu testing * add sleep for El Capitan platform to avoid race condition this occurs when integrated with the macos-user test recipe * Improve README/Documentation (#23) * implement build definition badge and minor tweaks * Add descriptions and attribute lists for recipes * Remove 'description' label from recipe names * Bump version, add documentation dir * Fix up the last commit * Separate 10.12 and 10.13 build status * Add table for build status * Add plist resource documentation * Add Xcode documentation * bump version
2017-12-14 22:03:03 +03:00
No attributes used in this recipe.
### Keep Awake
Prevent macOS from falling asleep, disable the screensaver, reboot upon power failure,
enable wake on LAN, enable remote login (SSH) and adjust several other settings
to always keep macOS on and available.
Release plist and macos_user resources, new Xcode libraries, test cookbook and documentation. (#24) * first commit plistbuddy * all recipe/plist in macos * extract plistbuddy to resource * Straighten out unit tests - Correctly include modules - Correctly setup spec_helper - Correct unit test / respec setup * first passing test * add more data type tests * Most data types passing - Boolean values are working - Array and data type values are not - PlistBuddy "commands" (add, print, etc.) are passing * More testing - Skip Array and Dict types as their implementation will be more complicated - Add test for float type - Put the correct type in the test description - Cookstyle changes * PlistBuddy and testing update - Add separate test cookbook for PlistBuddy resource - Add kitchen.yml for the above purpose - Modify and update plistbuddy resource/helpers * remove extra newline * add metadata file * edit metadata; add Berksfile * move Berksfile to correct location * add testing requirements for berks vendor * move kitchen file * Converge passing in test cookbook - Opportunistic cleanup of xcode test - some temp debugging info in resource definition - Rename name_property to command so as to not override action * Itempotence - Removed 'bool' prefix from boolean types, as that was somehow causing issues - Changed name_property to the path and removed that property - Use actual actions in the resource for the PlistBuddy commands * Fix false positive? - Not sure how the previous test was passing previously, but I adjusted the boolean value for the BazEntry test so that the signature input matches the output * Add logic for adding a value - The data type should only be used when adding a value to a plist. Otherwise, we don't need to use the data type * remove debugging; fix smoke tests * remove .kitchen.yml * bump version to 0.8.5 * unskip ChefSpec tests - they're passing * mark args_formatter as private method * Feature/macos user (#14) * first commit add_user recipe * Testing Refactor & macos_user resource - Create new testing cookbook that contains tests for both plistbuddy and macos_user resources. The hope here is to have a single testing cookbook that contains multiple suites and suite testing variations - Create new macos_user resource - contains single boolean 'true' settings for autologin and admin user. Still work to be done for admin user and all steps that need to be taken to acheive the task. * fix method call * fix another method call * user native ruby File class and not overriden * fix some minor issues with resource; add kcpassword file * Add OG Ruby kcpassword file helper module * slightly different approach for Kcpassword module * passing test * Fix up kcpassword library module, smoke tests - Modify Kcpassword helper module to use a method for magic bits. This isn't ideal, but it works for now - Update smoke tests so that john_jr's group ID is 20. This may not be correct, but setting as 20 until it is further investigated * opportunistic refactor of keep_awake recipe * Refactor testing cookbook layout - Consolodate testing suites into single default suite - Add tests for keep_awake recipe - Use more common examples to test PlistBuddy resource * move xcode test to test cookbook * Opportunistic bug fix for plistbuddy resource - Previously, the plistbuddy resource did not allow any keys with spaces unless they were used in the value itself. Now, you can use keys with spaces in the value property without needing to double-quote it - Also, fix the PlistBuddy executable string to be correct * revert kcpassword.rb helper to a671164 * fix incorrect PlistBuddy data type name * Fix kcpassword.rb and update plistbuddy UTs * Extract disabling screen saver to plistbuddy - Also, skip Xcode test temporarily * PlistBuddy idempotence - Remove systemsetup and pmset resource calls in keep_awake until they are made idempotent * update test and plist name * Implement binary plist conversion - Changes to binary plists via PlistBuddy must be converted back to binary since the change implicitly converts the file to xml. This change contains logic to convert back to binary if the file is detected to be binary in the first place. * attempts at idempotence using chef helper methods * early commit to get it on the remote * implement logic for plist return type to ruby data type * Add floating type value support A wild FAILING TEST appeared! ... HANKO used TDD! It's super effective! * move function * real idempotence! * passing all unit tests * update test cookbook name * update new_users integration tests * systemsetup idempotence * all smoke and unit tests passing * quick fix for timezone bug * remove kcpassword file as it is no longer needed * update path for test cookbook to be default repo name * Rename keep_awake_spec.rb to keep_awake_test.rb * Rename preferences_spec.rb to preferences_test.rb * Rename new_users_spec.rb to new_users_test.rb * fix typo * Use relative path for macos cookbook source * Improve readability of relative path for macos cookbook source * Bump version * Addressing changes in Pull Request #14 - Fix bug where screensaver was not properly being disabled, update tests accordingly - Rename plistbuddy resource to plist, including all related files and callers - Rename kcpassword helper to macos_user to match helper -> resource convention; fix top level namespace to be MacOS - Correctly name recipe unit tests - Implement plist resource into disable_software_updates.rb recipe - Add disable_software_updates.rb recipe to default kitchen suite and appropriate smoke tests - Remove relatively useless logic in systemsetup value property coercion * Implement binary plist conversion * Fix unit test and apply the Law of Demeter * update helper pattern to match current standard; include everywhere * remove helper reference in Xcode resource * bump version * update Xcode attribute to latest * extract xcode smoke tests to a different suite * update xcversion path for simulators test * update namespace again * refactor XcodeHelper modules in XCVersion, Xcode, and XCVersion modules updated methods to simplify site calls in resource * updated method calls for new modules * bump version * extract xcversion module to separate library file * add missing macos module * include parent module macos instead of child for xcode and xcversion * update available_simulator_versions to new method * bump version * add platform-specific smoke test for xcode * add xcode test recipe * update kitchen with xcode suite * refactor simulator method to call it's own available list of simulators * use new simulator method to find highest available version * move xcode prep work into the setup action * clear kitchen customizations * lazily evalutate ios simulator property * move lazy evaluation to simulator action in xcode resource * revert lazy execution * warn and retry if simulator list is empty * restore spacing * more whitespace * refactor highest_semantic_simulator method into class, smaller methods * implement simulator class * add more xcversion command methods * implement xcversion command methods * implement command methods correctly * add list methods for xcversion * implement xcversion list methods * implement install xcode correctly * reorder methods * add method to list installed xcodes * use more descriptive name for 'command' method * move where the space lives * implement installed xcodes command * implement install xcodes correctly * disable downloads prior to disabling software update check * Renamed name to device_name * Change name.rb to machine_name.rb to be similar with the apex automation cookbook. Instances of name are also all changed to machine_name. * Add new test recipe and smoke test for machine_name. * add disable-swu test suite * Bump up cookbook version numbers. * update kitchen test suite order, remove standalone swu testing * add sleep for El Capitan platform to avoid race condition this occurs when integrated with the macos-user test recipe * Improve README/Documentation (#23) * implement build definition badge and minor tweaks * Add descriptions and attribute lists for recipes * Remove 'description' label from recipe names * Bump version, add documentation dir * Fix up the last commit * Separate 10.12 and 10.13 build status * Add table for build status * Add plist resource documentation * Add Xcode documentation * bump version
2017-12-14 22:03:03 +03:00
**Usage:** `include_recipe 'macos::keep_awake'`
Release plist and macos_user resources, new Xcode libraries, test cookbook and documentation. (#24) * first commit plistbuddy * all recipe/plist in macos * extract plistbuddy to resource * Straighten out unit tests - Correctly include modules - Correctly setup spec_helper - Correct unit test / respec setup * first passing test * add more data type tests * Most data types passing - Boolean values are working - Array and data type values are not - PlistBuddy "commands" (add, print, etc.) are passing * More testing - Skip Array and Dict types as their implementation will be more complicated - Add test for float type - Put the correct type in the test description - Cookstyle changes * PlistBuddy and testing update - Add separate test cookbook for PlistBuddy resource - Add kitchen.yml for the above purpose - Modify and update plistbuddy resource/helpers * remove extra newline * add metadata file * edit metadata; add Berksfile * move Berksfile to correct location * add testing requirements for berks vendor * move kitchen file * Converge passing in test cookbook - Opportunistic cleanup of xcode test - some temp debugging info in resource definition - Rename name_property to command so as to not override action * Itempotence - Removed 'bool' prefix from boolean types, as that was somehow causing issues - Changed name_property to the path and removed that property - Use actual actions in the resource for the PlistBuddy commands * Fix false positive? - Not sure how the previous test was passing previously, but I adjusted the boolean value for the BazEntry test so that the signature input matches the output * Add logic for adding a value - The data type should only be used when adding a value to a plist. Otherwise, we don't need to use the data type * remove debugging; fix smoke tests * remove .kitchen.yml * bump version to 0.8.5 * unskip ChefSpec tests - they're passing * mark args_formatter as private method * Feature/macos user (#14) * first commit add_user recipe * Testing Refactor & macos_user resource - Create new testing cookbook that contains tests for both plistbuddy and macos_user resources. The hope here is to have a single testing cookbook that contains multiple suites and suite testing variations - Create new macos_user resource - contains single boolean 'true' settings for autologin and admin user. Still work to be done for admin user and all steps that need to be taken to acheive the task. * fix method call * fix another method call * user native ruby File class and not overriden * fix some minor issues with resource; add kcpassword file * Add OG Ruby kcpassword file helper module * slightly different approach for Kcpassword module * passing test * Fix up kcpassword library module, smoke tests - Modify Kcpassword helper module to use a method for magic bits. This isn't ideal, but it works for now - Update smoke tests so that john_jr's group ID is 20. This may not be correct, but setting as 20 until it is further investigated * opportunistic refactor of keep_awake recipe * Refactor testing cookbook layout - Consolodate testing suites into single default suite - Add tests for keep_awake recipe - Use more common examples to test PlistBuddy resource * move xcode test to test cookbook * Opportunistic bug fix for plistbuddy resource - Previously, the plistbuddy resource did not allow any keys with spaces unless they were used in the value itself. Now, you can use keys with spaces in the value property without needing to double-quote it - Also, fix the PlistBuddy executable string to be correct * revert kcpassword.rb helper to a671164 * fix incorrect PlistBuddy data type name * Fix kcpassword.rb and update plistbuddy UTs * Extract disabling screen saver to plistbuddy - Also, skip Xcode test temporarily * PlistBuddy idempotence - Remove systemsetup and pmset resource calls in keep_awake until they are made idempotent * update test and plist name * Implement binary plist conversion - Changes to binary plists via PlistBuddy must be converted back to binary since the change implicitly converts the file to xml. This change contains logic to convert back to binary if the file is detected to be binary in the first place. * attempts at idempotence using chef helper methods * early commit to get it on the remote * implement logic for plist return type to ruby data type * Add floating type value support A wild FAILING TEST appeared! ... HANKO used TDD! It's super effective! * move function * real idempotence! * passing all unit tests * update test cookbook name * update new_users integration tests * systemsetup idempotence * all smoke and unit tests passing * quick fix for timezone bug * remove kcpassword file as it is no longer needed * update path for test cookbook to be default repo name * Rename keep_awake_spec.rb to keep_awake_test.rb * Rename preferences_spec.rb to preferences_test.rb * Rename new_users_spec.rb to new_users_test.rb * fix typo * Use relative path for macos cookbook source * Improve readability of relative path for macos cookbook source * Bump version * Addressing changes in Pull Request #14 - Fix bug where screensaver was not properly being disabled, update tests accordingly - Rename plistbuddy resource to plist, including all related files and callers - Rename kcpassword helper to macos_user to match helper -> resource convention; fix top level namespace to be MacOS - Correctly name recipe unit tests - Implement plist resource into disable_software_updates.rb recipe - Add disable_software_updates.rb recipe to default kitchen suite and appropriate smoke tests - Remove relatively useless logic in systemsetup value property coercion * Implement binary plist conversion * Fix unit test and apply the Law of Demeter * update helper pattern to match current standard; include everywhere * remove helper reference in Xcode resource * bump version * update Xcode attribute to latest * extract xcode smoke tests to a different suite * update xcversion path for simulators test * update namespace again * refactor XcodeHelper modules in XCVersion, Xcode, and XCVersion modules updated methods to simplify site calls in resource * updated method calls for new modules * bump version * extract xcversion module to separate library file * add missing macos module * include parent module macos instead of child for xcode and xcversion * update available_simulator_versions to new method * bump version * add platform-specific smoke test for xcode * add xcode test recipe * update kitchen with xcode suite * refactor simulator method to call it's own available list of simulators * use new simulator method to find highest available version * move xcode prep work into the setup action * clear kitchen customizations * lazily evalutate ios simulator property * move lazy evaluation to simulator action in xcode resource * revert lazy execution * warn and retry if simulator list is empty * restore spacing * more whitespace * refactor highest_semantic_simulator method into class, smaller methods * implement simulator class * add more xcversion command methods * implement xcversion command methods * implement command methods correctly * add list methods for xcversion * implement xcversion list methods * implement install xcode correctly * reorder methods * add method to list installed xcodes * use more descriptive name for 'command' method * move where the space lives * implement installed xcodes command * implement install xcodes correctly * disable downloads prior to disabling software update check * Renamed name to device_name * Change name.rb to machine_name.rb to be similar with the apex automation cookbook. Instances of name are also all changed to machine_name. * Add new test recipe and smoke test for machine_name. * add disable-swu test suite * Bump up cookbook version numbers. * update kitchen test suite order, remove standalone swu testing * add sleep for El Capitan platform to avoid race condition this occurs when integrated with the macos-user test recipe * Improve README/Documentation (#23) * implement build definition badge and minor tweaks * Add descriptions and attribute lists for recipes * Remove 'description' label from recipe names * Bump version, add documentation dir * Fix up the last commit * Separate 10.12 and 10.13 build status * Add table for build status * Add plist resource documentation * Add Xcode documentation * bump version
2017-12-14 22:03:03 +03:00
| Attributes used | Default value |
|-----------------------------------------|-------------------------|
| `node['macos']['remote_login_enabled']` | `true` |
| `node['macos']['disk_sleep_disabled']` | `false` |
| `node['macos']['network_time_server']` | `'time.windows.com'` |
| `node['macos']['time_zone']` | `'America/Los_Angeles'` |
### Mono
Installs [Mono](http://www.mono-project.com/docs/about-mono/). Requires setting
the `package`, `version` and `checksum` attributes in order to override.
**Usage:** `include_recipe 'macos::mono'`
| Attributes used | Default value |
|-------------------------------------|----------------------------------------------------------------------|
| `node['macos']['mono']['package']` | `'MonoFramework-MDK-4.4.2.11.macos10.xamarin.universal.pkg'` |
| `node['macos']['mono']['version']` | `'4.4.2'` |
Release plist and macos_user resources, new Xcode libraries, test cookbook and documentation. (#24) * first commit plistbuddy * all recipe/plist in macos * extract plistbuddy to resource * Straighten out unit tests - Correctly include modules - Correctly setup spec_helper - Correct unit test / respec setup * first passing test * add more data type tests * Most data types passing - Boolean values are working - Array and data type values are not - PlistBuddy "commands" (add, print, etc.) are passing * More testing - Skip Array and Dict types as their implementation will be more complicated - Add test for float type - Put the correct type in the test description - Cookstyle changes * PlistBuddy and testing update - Add separate test cookbook for PlistBuddy resource - Add kitchen.yml for the above purpose - Modify and update plistbuddy resource/helpers * remove extra newline * add metadata file * edit metadata; add Berksfile * move Berksfile to correct location * add testing requirements for berks vendor * move kitchen file * Converge passing in test cookbook - Opportunistic cleanup of xcode test - some temp debugging info in resource definition - Rename name_property to command so as to not override action * Itempotence - Removed 'bool' prefix from boolean types, as that was somehow causing issues - Changed name_property to the path and removed that property - Use actual actions in the resource for the PlistBuddy commands * Fix false positive? - Not sure how the previous test was passing previously, but I adjusted the boolean value for the BazEntry test so that the signature input matches the output * Add logic for adding a value - The data type should only be used when adding a value to a plist. Otherwise, we don't need to use the data type * remove debugging; fix smoke tests * remove .kitchen.yml * bump version to 0.8.5 * unskip ChefSpec tests - they're passing * mark args_formatter as private method * Feature/macos user (#14) * first commit add_user recipe * Testing Refactor & macos_user resource - Create new testing cookbook that contains tests for both plistbuddy and macos_user resources. The hope here is to have a single testing cookbook that contains multiple suites and suite testing variations - Create new macos_user resource - contains single boolean 'true' settings for autologin and admin user. Still work to be done for admin user and all steps that need to be taken to acheive the task. * fix method call * fix another method call * user native ruby File class and not overriden * fix some minor issues with resource; add kcpassword file * Add OG Ruby kcpassword file helper module * slightly different approach for Kcpassword module * passing test * Fix up kcpassword library module, smoke tests - Modify Kcpassword helper module to use a method for magic bits. This isn't ideal, but it works for now - Update smoke tests so that john_jr's group ID is 20. This may not be correct, but setting as 20 until it is further investigated * opportunistic refactor of keep_awake recipe * Refactor testing cookbook layout - Consolodate testing suites into single default suite - Add tests for keep_awake recipe - Use more common examples to test PlistBuddy resource * move xcode test to test cookbook * Opportunistic bug fix for plistbuddy resource - Previously, the plistbuddy resource did not allow any keys with spaces unless they were used in the value itself. Now, you can use keys with spaces in the value property without needing to double-quote it - Also, fix the PlistBuddy executable string to be correct * revert kcpassword.rb helper to a671164 * fix incorrect PlistBuddy data type name * Fix kcpassword.rb and update plistbuddy UTs * Extract disabling screen saver to plistbuddy - Also, skip Xcode test temporarily * PlistBuddy idempotence - Remove systemsetup and pmset resource calls in keep_awake until they are made idempotent * update test and plist name * Implement binary plist conversion - Changes to binary plists via PlistBuddy must be converted back to binary since the change implicitly converts the file to xml. This change contains logic to convert back to binary if the file is detected to be binary in the first place. * attempts at idempotence using chef helper methods * early commit to get it on the remote * implement logic for plist return type to ruby data type * Add floating type value support A wild FAILING TEST appeared! ... HANKO used TDD! It's super effective! * move function * real idempotence! * passing all unit tests * update test cookbook name * update new_users integration tests * systemsetup idempotence * all smoke and unit tests passing * quick fix for timezone bug * remove kcpassword file as it is no longer needed * update path for test cookbook to be default repo name * Rename keep_awake_spec.rb to keep_awake_test.rb * Rename preferences_spec.rb to preferences_test.rb * Rename new_users_spec.rb to new_users_test.rb * fix typo * Use relative path for macos cookbook source * Improve readability of relative path for macos cookbook source * Bump version * Addressing changes in Pull Request #14 - Fix bug where screensaver was not properly being disabled, update tests accordingly - Rename plistbuddy resource to plist, including all related files and callers - Rename kcpassword helper to macos_user to match helper -> resource convention; fix top level namespace to be MacOS - Correctly name recipe unit tests - Implement plist resource into disable_software_updates.rb recipe - Add disable_software_updates.rb recipe to default kitchen suite and appropriate smoke tests - Remove relatively useless logic in systemsetup value property coercion * Implement binary plist conversion * Fix unit test and apply the Law of Demeter * update helper pattern to match current standard; include everywhere * remove helper reference in Xcode resource * bump version * update Xcode attribute to latest * extract xcode smoke tests to a different suite * update xcversion path for simulators test * update namespace again * refactor XcodeHelper modules in XCVersion, Xcode, and XCVersion modules updated methods to simplify site calls in resource * updated method calls for new modules * bump version * extract xcversion module to separate library file * add missing macos module * include parent module macos instead of child for xcode and xcversion * update available_simulator_versions to new method * bump version * add platform-specific smoke test for xcode * add xcode test recipe * update kitchen with xcode suite * refactor simulator method to call it's own available list of simulators * use new simulator method to find highest available version * move xcode prep work into the setup action * clear kitchen customizations * lazily evalutate ios simulator property * move lazy evaluation to simulator action in xcode resource * revert lazy execution * warn and retry if simulator list is empty * restore spacing * more whitespace * refactor highest_semantic_simulator method into class, smaller methods * implement simulator class * add more xcversion command methods * implement xcversion command methods * implement command methods correctly * add list methods for xcversion * implement xcversion list methods * implement install xcode correctly * reorder methods * add method to list installed xcodes * use more descriptive name for 'command' method * move where the space lives * implement installed xcodes command * implement install xcodes correctly * disable downloads prior to disabling software update check * Renamed name to device_name * Change name.rb to machine_name.rb to be similar with the apex automation cookbook. Instances of name are also all changed to machine_name. * Add new test recipe and smoke test for machine_name. * add disable-swu test suite * Bump up cookbook version numbers. * update kitchen test suite order, remove standalone swu testing * add sleep for El Capitan platform to avoid race condition this occurs when integrated with the macos-user test recipe * Improve README/Documentation (#23) * implement build definition badge and minor tweaks * Add descriptions and attribute lists for recipes * Remove 'description' label from recipe names * Bump version, add documentation dir * Fix up the last commit * Separate 10.12 and 10.13 build status * Add table for build status * Add plist resource documentation * Add Xcode documentation * bump version
2017-12-14 22:03:03 +03:00
| `node['macos']['mono']['checksum']` | `'d8bfbee7ae4d0d1facaf0ddfb70c0de4b1a3d94bb1b4c38e8fa4884539f54e23'` |
Release plist and macos_user resources, new Xcode libraries, test cookbook and documentation. (#24) * first commit plistbuddy * all recipe/plist in macos * extract plistbuddy to resource * Straighten out unit tests - Correctly include modules - Correctly setup spec_helper - Correct unit test / respec setup * first passing test * add more data type tests * Most data types passing - Boolean values are working - Array and data type values are not - PlistBuddy "commands" (add, print, etc.) are passing * More testing - Skip Array and Dict types as their implementation will be more complicated - Add test for float type - Put the correct type in the test description - Cookstyle changes * PlistBuddy and testing update - Add separate test cookbook for PlistBuddy resource - Add kitchen.yml for the above purpose - Modify and update plistbuddy resource/helpers * remove extra newline * add metadata file * edit metadata; add Berksfile * move Berksfile to correct location * add testing requirements for berks vendor * move kitchen file * Converge passing in test cookbook - Opportunistic cleanup of xcode test - some temp debugging info in resource definition - Rename name_property to command so as to not override action * Itempotence - Removed 'bool' prefix from boolean types, as that was somehow causing issues - Changed name_property to the path and removed that property - Use actual actions in the resource for the PlistBuddy commands * Fix false positive? - Not sure how the previous test was passing previously, but I adjusted the boolean value for the BazEntry test so that the signature input matches the output * Add logic for adding a value - The data type should only be used when adding a value to a plist. Otherwise, we don't need to use the data type * remove debugging; fix smoke tests * remove .kitchen.yml * bump version to 0.8.5 * unskip ChefSpec tests - they're passing * mark args_formatter as private method * Feature/macos user (#14) * first commit add_user recipe * Testing Refactor & macos_user resource - Create new testing cookbook that contains tests for both plistbuddy and macos_user resources. The hope here is to have a single testing cookbook that contains multiple suites and suite testing variations - Create new macos_user resource - contains single boolean 'true' settings for autologin and admin user. Still work to be done for admin user and all steps that need to be taken to acheive the task. * fix method call * fix another method call * user native ruby File class and not overriden * fix some minor issues with resource; add kcpassword file * Add OG Ruby kcpassword file helper module * slightly different approach for Kcpassword module * passing test * Fix up kcpassword library module, smoke tests - Modify Kcpassword helper module to use a method for magic bits. This isn't ideal, but it works for now - Update smoke tests so that john_jr's group ID is 20. This may not be correct, but setting as 20 until it is further investigated * opportunistic refactor of keep_awake recipe * Refactor testing cookbook layout - Consolodate testing suites into single default suite - Add tests for keep_awake recipe - Use more common examples to test PlistBuddy resource * move xcode test to test cookbook * Opportunistic bug fix for plistbuddy resource - Previously, the plistbuddy resource did not allow any keys with spaces unless they were used in the value itself. Now, you can use keys with spaces in the value property without needing to double-quote it - Also, fix the PlistBuddy executable string to be correct * revert kcpassword.rb helper to a671164 * fix incorrect PlistBuddy data type name * Fix kcpassword.rb and update plistbuddy UTs * Extract disabling screen saver to plistbuddy - Also, skip Xcode test temporarily * PlistBuddy idempotence - Remove systemsetup and pmset resource calls in keep_awake until they are made idempotent * update test and plist name * Implement binary plist conversion - Changes to binary plists via PlistBuddy must be converted back to binary since the change implicitly converts the file to xml. This change contains logic to convert back to binary if the file is detected to be binary in the first place. * attempts at idempotence using chef helper methods * early commit to get it on the remote * implement logic for plist return type to ruby data type * Add floating type value support A wild FAILING TEST appeared! ... HANKO used TDD! It's super effective! * move function * real idempotence! * passing all unit tests * update test cookbook name * update new_users integration tests * systemsetup idempotence * all smoke and unit tests passing * quick fix for timezone bug * remove kcpassword file as it is no longer needed * update path for test cookbook to be default repo name * Rename keep_awake_spec.rb to keep_awake_test.rb * Rename preferences_spec.rb to preferences_test.rb * Rename new_users_spec.rb to new_users_test.rb * fix typo * Use relative path for macos cookbook source * Improve readability of relative path for macos cookbook source * Bump version * Addressing changes in Pull Request #14 - Fix bug where screensaver was not properly being disabled, update tests accordingly - Rename plistbuddy resource to plist, including all related files and callers - Rename kcpassword helper to macos_user to match helper -> resource convention; fix top level namespace to be MacOS - Correctly name recipe unit tests - Implement plist resource into disable_software_updates.rb recipe - Add disable_software_updates.rb recipe to default kitchen suite and appropriate smoke tests - Remove relatively useless logic in systemsetup value property coercion * Implement binary plist conversion * Fix unit test and apply the Law of Demeter * update helper pattern to match current standard; include everywhere * remove helper reference in Xcode resource * bump version * update Xcode attribute to latest * extract xcode smoke tests to a different suite * update xcversion path for simulators test * update namespace again * refactor XcodeHelper modules in XCVersion, Xcode, and XCVersion modules updated methods to simplify site calls in resource * updated method calls for new modules * bump version * extract xcversion module to separate library file * add missing macos module * include parent module macos instead of child for xcode and xcversion * update available_simulator_versions to new method * bump version * add platform-specific smoke test for xcode * add xcode test recipe * update kitchen with xcode suite * refactor simulator method to call it's own available list of simulators * use new simulator method to find highest available version * move xcode prep work into the setup action * clear kitchen customizations * lazily evalutate ios simulator property * move lazy evaluation to simulator action in xcode resource * revert lazy execution * warn and retry if simulator list is empty * restore spacing * more whitespace * refactor highest_semantic_simulator method into class, smaller methods * implement simulator class * add more xcversion command methods * implement xcversion command methods * implement command methods correctly * add list methods for xcversion * implement xcversion list methods * implement install xcode correctly * reorder methods * add method to list installed xcodes * use more descriptive name for 'command' method * move where the space lives * implement installed xcodes command * implement install xcodes correctly * disable downloads prior to disabling software update check * Renamed name to device_name * Change name.rb to machine_name.rb to be similar with the apex automation cookbook. Instances of name are also all changed to machine_name. * Add new test recipe and smoke test for machine_name. * add disable-swu test suite * Bump up cookbook version numbers. * update kitchen test suite order, remove standalone swu testing * add sleep for El Capitan platform to avoid race condition this occurs when integrated with the macos-user test recipe * Improve README/Documentation (#23) * implement build definition badge and minor tweaks * Add descriptions and attribute lists for recipes * Remove 'description' label from recipe names * Bump version, add documentation dir * Fix up the last commit * Separate 10.12 and 10.13 build status * Add table for build status * Add plist resource documentation * Add Xcode documentation * bump version
2017-12-14 22:03:03 +03:00
### Xcode
Installs Xcode 9.2 and simulators for iOS 10 and iOS 11. See the
[Xcode resource documentation](https://github.com/Microsoft/macos-cookbook/blob/master/documentation/resource_xcode.md) if you need
more flexibility.
:warning: Requires a `credentials` data bag containing an `apple_id` data bag item,
or a user/password pair set under `node['macos']['apple_id']`.
**Usage:** `include_recipe 'macos::xcode'`
| Attributes used | Default value |
|--------------------------------------------------------|---------------|
| `node['macos']['xcode']['version']` | `'9.2'` |
| `node['macos']['xcode']['simulator']['major_version']` | `[11, 10]` |
| `node['macos']['apple_id']['user']` | `nil` |
| `node['macos']['apple_id']['password']` | `nil` |
Release plist and macos_user resources, new Xcode libraries, test cookbook and documentation. (#24) * first commit plistbuddy * all recipe/plist in macos * extract plistbuddy to resource * Straighten out unit tests - Correctly include modules - Correctly setup spec_helper - Correct unit test / respec setup * first passing test * add more data type tests * Most data types passing - Boolean values are working - Array and data type values are not - PlistBuddy "commands" (add, print, etc.) are passing * More testing - Skip Array and Dict types as their implementation will be more complicated - Add test for float type - Put the correct type in the test description - Cookstyle changes * PlistBuddy and testing update - Add separate test cookbook for PlistBuddy resource - Add kitchen.yml for the above purpose - Modify and update plistbuddy resource/helpers * remove extra newline * add metadata file * edit metadata; add Berksfile * move Berksfile to correct location * add testing requirements for berks vendor * move kitchen file * Converge passing in test cookbook - Opportunistic cleanup of xcode test - some temp debugging info in resource definition - Rename name_property to command so as to not override action * Itempotence - Removed 'bool' prefix from boolean types, as that was somehow causing issues - Changed name_property to the path and removed that property - Use actual actions in the resource for the PlistBuddy commands * Fix false positive? - Not sure how the previous test was passing previously, but I adjusted the boolean value for the BazEntry test so that the signature input matches the output * Add logic for adding a value - The data type should only be used when adding a value to a plist. Otherwise, we don't need to use the data type * remove debugging; fix smoke tests * remove .kitchen.yml * bump version to 0.8.5 * unskip ChefSpec tests - they're passing * mark args_formatter as private method * Feature/macos user (#14) * first commit add_user recipe * Testing Refactor & macos_user resource - Create new testing cookbook that contains tests for both plistbuddy and macos_user resources. The hope here is to have a single testing cookbook that contains multiple suites and suite testing variations - Create new macos_user resource - contains single boolean 'true' settings for autologin and admin user. Still work to be done for admin user and all steps that need to be taken to acheive the task. * fix method call * fix another method call * user native ruby File class and not overriden * fix some minor issues with resource; add kcpassword file * Add OG Ruby kcpassword file helper module * slightly different approach for Kcpassword module * passing test * Fix up kcpassword library module, smoke tests - Modify Kcpassword helper module to use a method for magic bits. This isn't ideal, but it works for now - Update smoke tests so that john_jr's group ID is 20. This may not be correct, but setting as 20 until it is further investigated * opportunistic refactor of keep_awake recipe * Refactor testing cookbook layout - Consolodate testing suites into single default suite - Add tests for keep_awake recipe - Use more common examples to test PlistBuddy resource * move xcode test to test cookbook * Opportunistic bug fix for plistbuddy resource - Previously, the plistbuddy resource did not allow any keys with spaces unless they were used in the value itself. Now, you can use keys with spaces in the value property without needing to double-quote it - Also, fix the PlistBuddy executable string to be correct * revert kcpassword.rb helper to a671164 * fix incorrect PlistBuddy data type name * Fix kcpassword.rb and update plistbuddy UTs * Extract disabling screen saver to plistbuddy - Also, skip Xcode test temporarily * PlistBuddy idempotence - Remove systemsetup and pmset resource calls in keep_awake until they are made idempotent * update test and plist name * Implement binary plist conversion - Changes to binary plists via PlistBuddy must be converted back to binary since the change implicitly converts the file to xml. This change contains logic to convert back to binary if the file is detected to be binary in the first place. * attempts at idempotence using chef helper methods * early commit to get it on the remote * implement logic for plist return type to ruby data type * Add floating type value support A wild FAILING TEST appeared! ... HANKO used TDD! It's super effective! * move function * real idempotence! * passing all unit tests * update test cookbook name * update new_users integration tests * systemsetup idempotence * all smoke and unit tests passing * quick fix for timezone bug * remove kcpassword file as it is no longer needed * update path for test cookbook to be default repo name * Rename keep_awake_spec.rb to keep_awake_test.rb * Rename preferences_spec.rb to preferences_test.rb * Rename new_users_spec.rb to new_users_test.rb * fix typo * Use relative path for macos cookbook source * Improve readability of relative path for macos cookbook source * Bump version * Addressing changes in Pull Request #14 - Fix bug where screensaver was not properly being disabled, update tests accordingly - Rename plistbuddy resource to plist, including all related files and callers - Rename kcpassword helper to macos_user to match helper -> resource convention; fix top level namespace to be MacOS - Correctly name recipe unit tests - Implement plist resource into disable_software_updates.rb recipe - Add disable_software_updates.rb recipe to default kitchen suite and appropriate smoke tests - Remove relatively useless logic in systemsetup value property coercion * Implement binary plist conversion * Fix unit test and apply the Law of Demeter * update helper pattern to match current standard; include everywhere * remove helper reference in Xcode resource * bump version * update Xcode attribute to latest * extract xcode smoke tests to a different suite * update xcversion path for simulators test * update namespace again * refactor XcodeHelper modules in XCVersion, Xcode, and XCVersion modules updated methods to simplify site calls in resource * updated method calls for new modules * bump version * extract xcversion module to separate library file * add missing macos module * include parent module macos instead of child for xcode and xcversion * update available_simulator_versions to new method * bump version * add platform-specific smoke test for xcode * add xcode test recipe * update kitchen with xcode suite * refactor simulator method to call it's own available list of simulators * use new simulator method to find highest available version * move xcode prep work into the setup action * clear kitchen customizations * lazily evalutate ios simulator property * move lazy evaluation to simulator action in xcode resource * revert lazy execution * warn and retry if simulator list is empty * restore spacing * more whitespace * refactor highest_semantic_simulator method into class, smaller methods * implement simulator class * add more xcversion command methods * implement xcversion command methods * implement command methods correctly * add list methods for xcversion * implement xcversion list methods * implement install xcode correctly * reorder methods * add method to list installed xcodes * use more descriptive name for 'command' method * move where the space lives * implement installed xcodes command * implement install xcodes correctly * disable downloads prior to disabling software update check * Renamed name to device_name * Change name.rb to machine_name.rb to be similar with the apex automation cookbook. Instances of name are also all changed to machine_name. * Add new test recipe and smoke test for machine_name. * add disable-swu test suite * Bump up cookbook version numbers. * update kitchen test suite order, remove standalone swu testing * add sleep for El Capitan platform to avoid race condition this occurs when integrated with the macos-user test recipe * Improve README/Documentation (#23) * implement build definition badge and minor tweaks * Add descriptions and attribute lists for recipes * Remove 'description' label from recipe names * Bump version, add documentation dir * Fix up the last commit * Separate 10.12 and 10.13 build status * Add table for build status * Add plist resource documentation * Add Xcode documentation * bump version
2017-12-14 22:03:03 +03:00
### Apple Configurator 2
Installs Apple Configurator 2 using `mas` and links `cfgutil` to
`/usr/local/bin`.
:warning: Requires a `credentials` data bag containing an `apple_id` data bag item.
Release plist and macos_user resources, new Xcode libraries, test cookbook and documentation. (#24) * first commit plistbuddy * all recipe/plist in macos * extract plistbuddy to resource * Straighten out unit tests - Correctly include modules - Correctly setup spec_helper - Correct unit test / respec setup * first passing test * add more data type tests * Most data types passing - Boolean values are working - Array and data type values are not - PlistBuddy "commands" (add, print, etc.) are passing * More testing - Skip Array and Dict types as their implementation will be more complicated - Add test for float type - Put the correct type in the test description - Cookstyle changes * PlistBuddy and testing update - Add separate test cookbook for PlistBuddy resource - Add kitchen.yml for the above purpose - Modify and update plistbuddy resource/helpers * remove extra newline * add metadata file * edit metadata; add Berksfile * move Berksfile to correct location * add testing requirements for berks vendor * move kitchen file * Converge passing in test cookbook - Opportunistic cleanup of xcode test - some temp debugging info in resource definition - Rename name_property to command so as to not override action * Itempotence - Removed 'bool' prefix from boolean types, as that was somehow causing issues - Changed name_property to the path and removed that property - Use actual actions in the resource for the PlistBuddy commands * Fix false positive? - Not sure how the previous test was passing previously, but I adjusted the boolean value for the BazEntry test so that the signature input matches the output * Add logic for adding a value - The data type should only be used when adding a value to a plist. Otherwise, we don't need to use the data type * remove debugging; fix smoke tests * remove .kitchen.yml * bump version to 0.8.5 * unskip ChefSpec tests - they're passing * mark args_formatter as private method * Feature/macos user (#14) * first commit add_user recipe * Testing Refactor & macos_user resource - Create new testing cookbook that contains tests for both plistbuddy and macos_user resources. The hope here is to have a single testing cookbook that contains multiple suites and suite testing variations - Create new macos_user resource - contains single boolean 'true' settings for autologin and admin user. Still work to be done for admin user and all steps that need to be taken to acheive the task. * fix method call * fix another method call * user native ruby File class and not overriden * fix some minor issues with resource; add kcpassword file * Add OG Ruby kcpassword file helper module * slightly different approach for Kcpassword module * passing test * Fix up kcpassword library module, smoke tests - Modify Kcpassword helper module to use a method for magic bits. This isn't ideal, but it works for now - Update smoke tests so that john_jr's group ID is 20. This may not be correct, but setting as 20 until it is further investigated * opportunistic refactor of keep_awake recipe * Refactor testing cookbook layout - Consolodate testing suites into single default suite - Add tests for keep_awake recipe - Use more common examples to test PlistBuddy resource * move xcode test to test cookbook * Opportunistic bug fix for plistbuddy resource - Previously, the plistbuddy resource did not allow any keys with spaces unless they were used in the value itself. Now, you can use keys with spaces in the value property without needing to double-quote it - Also, fix the PlistBuddy executable string to be correct * revert kcpassword.rb helper to a671164 * fix incorrect PlistBuddy data type name * Fix kcpassword.rb and update plistbuddy UTs * Extract disabling screen saver to plistbuddy - Also, skip Xcode test temporarily * PlistBuddy idempotence - Remove systemsetup and pmset resource calls in keep_awake until they are made idempotent * update test and plist name * Implement binary plist conversion - Changes to binary plists via PlistBuddy must be converted back to binary since the change implicitly converts the file to xml. This change contains logic to convert back to binary if the file is detected to be binary in the first place. * attempts at idempotence using chef helper methods * early commit to get it on the remote * implement logic for plist return type to ruby data type * Add floating type value support A wild FAILING TEST appeared! ... HANKO used TDD! It's super effective! * move function * real idempotence! * passing all unit tests * update test cookbook name * update new_users integration tests * systemsetup idempotence * all smoke and unit tests passing * quick fix for timezone bug * remove kcpassword file as it is no longer needed * update path for test cookbook to be default repo name * Rename keep_awake_spec.rb to keep_awake_test.rb * Rename preferences_spec.rb to preferences_test.rb * Rename new_users_spec.rb to new_users_test.rb * fix typo * Use relative path for macos cookbook source * Improve readability of relative path for macos cookbook source * Bump version * Addressing changes in Pull Request #14 - Fix bug where screensaver was not properly being disabled, update tests accordingly - Rename plistbuddy resource to plist, including all related files and callers - Rename kcpassword helper to macos_user to match helper -> resource convention; fix top level namespace to be MacOS - Correctly name recipe unit tests - Implement plist resource into disable_software_updates.rb recipe - Add disable_software_updates.rb recipe to default kitchen suite and appropriate smoke tests - Remove relatively useless logic in systemsetup value property coercion * Implement binary plist conversion * Fix unit test and apply the Law of Demeter * update helper pattern to match current standard; include everywhere * remove helper reference in Xcode resource * bump version * update Xcode attribute to latest * extract xcode smoke tests to a different suite * update xcversion path for simulators test * update namespace again * refactor XcodeHelper modules in XCVersion, Xcode, and XCVersion modules updated methods to simplify site calls in resource * updated method calls for new modules * bump version * extract xcversion module to separate library file * add missing macos module * include parent module macos instead of child for xcode and xcversion * update available_simulator_versions to new method * bump version * add platform-specific smoke test for xcode * add xcode test recipe * update kitchen with xcode suite * refactor simulator method to call it's own available list of simulators * use new simulator method to find highest available version * move xcode prep work into the setup action * clear kitchen customizations * lazily evalutate ios simulator property * move lazy evaluation to simulator action in xcode resource * revert lazy execution * warn and retry if simulator list is empty * restore spacing * more whitespace * refactor highest_semantic_simulator method into class, smaller methods * implement simulator class * add more xcversion command methods * implement xcversion command methods * implement command methods correctly * add list methods for xcversion * implement xcversion list methods * implement install xcode correctly * reorder methods * add method to list installed xcodes * use more descriptive name for 'command' method * move where the space lives * implement installed xcodes command * implement install xcodes correctly * disable downloads prior to disabling software update check * Renamed name to device_name * Change name.rb to machine_name.rb to be similar with the apex automation cookbook. Instances of name are also all changed to machine_name. * Add new test recipe and smoke test for machine_name. * add disable-swu test suite * Bump up cookbook version numbers. * update kitchen test suite order, remove standalone swu testing * add sleep for El Capitan platform to avoid race condition this occurs when integrated with the macos-user test recipe * Improve README/Documentation (#23) * implement build definition badge and minor tweaks * Add descriptions and attribute lists for recipes * Remove 'description' label from recipe names * Bump version, add documentation dir * Fix up the last commit * Separate 10.12 and 10.13 build status * Add table for build status * Add plist resource documentation * Add Xcode documentation * bump version
2017-12-14 22:03:03 +03:00
**Usage:** `include_recipe 'macos::configurator'`
Release plist and macos_user resources, new Xcode libraries, test cookbook and documentation. (#24) * first commit plistbuddy * all recipe/plist in macos * extract plistbuddy to resource * Straighten out unit tests - Correctly include modules - Correctly setup spec_helper - Correct unit test / respec setup * first passing test * add more data type tests * Most data types passing - Boolean values are working - Array and data type values are not - PlistBuddy "commands" (add, print, etc.) are passing * More testing - Skip Array and Dict types as their implementation will be more complicated - Add test for float type - Put the correct type in the test description - Cookstyle changes * PlistBuddy and testing update - Add separate test cookbook for PlistBuddy resource - Add kitchen.yml for the above purpose - Modify and update plistbuddy resource/helpers * remove extra newline * add metadata file * edit metadata; add Berksfile * move Berksfile to correct location * add testing requirements for berks vendor * move kitchen file * Converge passing in test cookbook - Opportunistic cleanup of xcode test - some temp debugging info in resource definition - Rename name_property to command so as to not override action * Itempotence - Removed 'bool' prefix from boolean types, as that was somehow causing issues - Changed name_property to the path and removed that property - Use actual actions in the resource for the PlistBuddy commands * Fix false positive? - Not sure how the previous test was passing previously, but I adjusted the boolean value for the BazEntry test so that the signature input matches the output * Add logic for adding a value - The data type should only be used when adding a value to a plist. Otherwise, we don't need to use the data type * remove debugging; fix smoke tests * remove .kitchen.yml * bump version to 0.8.5 * unskip ChefSpec tests - they're passing * mark args_formatter as private method * Feature/macos user (#14) * first commit add_user recipe * Testing Refactor & macos_user resource - Create new testing cookbook that contains tests for both plistbuddy and macos_user resources. The hope here is to have a single testing cookbook that contains multiple suites and suite testing variations - Create new macos_user resource - contains single boolean 'true' settings for autologin and admin user. Still work to be done for admin user and all steps that need to be taken to acheive the task. * fix method call * fix another method call * user native ruby File class and not overriden * fix some minor issues with resource; add kcpassword file * Add OG Ruby kcpassword file helper module * slightly different approach for Kcpassword module * passing test * Fix up kcpassword library module, smoke tests - Modify Kcpassword helper module to use a method for magic bits. This isn't ideal, but it works for now - Update smoke tests so that john_jr's group ID is 20. This may not be correct, but setting as 20 until it is further investigated * opportunistic refactor of keep_awake recipe * Refactor testing cookbook layout - Consolodate testing suites into single default suite - Add tests for keep_awake recipe - Use more common examples to test PlistBuddy resource * move xcode test to test cookbook * Opportunistic bug fix for plistbuddy resource - Previously, the plistbuddy resource did not allow any keys with spaces unless they were used in the value itself. Now, you can use keys with spaces in the value property without needing to double-quote it - Also, fix the PlistBuddy executable string to be correct * revert kcpassword.rb helper to a671164 * fix incorrect PlistBuddy data type name * Fix kcpassword.rb and update plistbuddy UTs * Extract disabling screen saver to plistbuddy - Also, skip Xcode test temporarily * PlistBuddy idempotence - Remove systemsetup and pmset resource calls in keep_awake until they are made idempotent * update test and plist name * Implement binary plist conversion - Changes to binary plists via PlistBuddy must be converted back to binary since the change implicitly converts the file to xml. This change contains logic to convert back to binary if the file is detected to be binary in the first place. * attempts at idempotence using chef helper methods * early commit to get it on the remote * implement logic for plist return type to ruby data type * Add floating type value support A wild FAILING TEST appeared! ... HANKO used TDD! It's super effective! * move function * real idempotence! * passing all unit tests * update test cookbook name * update new_users integration tests * systemsetup idempotence * all smoke and unit tests passing * quick fix for timezone bug * remove kcpassword file as it is no longer needed * update path for test cookbook to be default repo name * Rename keep_awake_spec.rb to keep_awake_test.rb * Rename preferences_spec.rb to preferences_test.rb * Rename new_users_spec.rb to new_users_test.rb * fix typo * Use relative path for macos cookbook source * Improve readability of relative path for macos cookbook source * Bump version * Addressing changes in Pull Request #14 - Fix bug where screensaver was not properly being disabled, update tests accordingly - Rename plistbuddy resource to plist, including all related files and callers - Rename kcpassword helper to macos_user to match helper -> resource convention; fix top level namespace to be MacOS - Correctly name recipe unit tests - Implement plist resource into disable_software_updates.rb recipe - Add disable_software_updates.rb recipe to default kitchen suite and appropriate smoke tests - Remove relatively useless logic in systemsetup value property coercion * Implement binary plist conversion * Fix unit test and apply the Law of Demeter * update helper pattern to match current standard; include everywhere * remove helper reference in Xcode resource * bump version * update Xcode attribute to latest * extract xcode smoke tests to a different suite * update xcversion path for simulators test * update namespace again * refactor XcodeHelper modules in XCVersion, Xcode, and XCVersion modules updated methods to simplify site calls in resource * updated method calls for new modules * bump version * extract xcversion module to separate library file * add missing macos module * include parent module macos instead of child for xcode and xcversion * update available_simulator_versions to new method * bump version * add platform-specific smoke test for xcode * add xcode test recipe * update kitchen with xcode suite * refactor simulator method to call it's own available list of simulators * use new simulator method to find highest available version * move xcode prep work into the setup action * clear kitchen customizations * lazily evalutate ios simulator property * move lazy evaluation to simulator action in xcode resource * revert lazy execution * warn and retry if simulator list is empty * restore spacing * more whitespace * refactor highest_semantic_simulator method into class, smaller methods * implement simulator class * add more xcversion command methods * implement xcversion command methods * implement command methods correctly * add list methods for xcversion * implement xcversion list methods * implement install xcode correctly * reorder methods * add method to list installed xcodes * use more descriptive name for 'command' method * move where the space lives * implement installed xcodes command * implement install xcodes correctly * disable downloads prior to disabling software update check * Renamed name to device_name * Change name.rb to machine_name.rb to be similar with the apex automation cookbook. Instances of name are also all changed to machine_name. * Add new test recipe and smoke test for machine_name. * add disable-swu test suite * Bump up cookbook version numbers. * update kitchen test suite order, remove standalone swu testing * add sleep for El Capitan platform to avoid race condition this occurs when integrated with the macos-user test recipe * Improve README/Documentation (#23) * implement build definition badge and minor tweaks * Add descriptions and attribute lists for recipes * Remove 'description' label from recipe names * Bump version, add documentation dir * Fix up the last commit * Separate 10.12 and 10.13 build status * Add table for build status * Add plist resource documentation * Add Xcode documentation * bump version
2017-12-14 22:03:03 +03:00
**Attributes**: No attributes used in this recipe.
Data Bags
---------
Release plist and macos_user resources, new Xcode libraries, test cookbook and documentation. (#24) * first commit plistbuddy * all recipe/plist in macos * extract plistbuddy to resource * Straighten out unit tests - Correctly include modules - Correctly setup spec_helper - Correct unit test / respec setup * first passing test * add more data type tests * Most data types passing - Boolean values are working - Array and data type values are not - PlistBuddy "commands" (add, print, etc.) are passing * More testing - Skip Array and Dict types as their implementation will be more complicated - Add test for float type - Put the correct type in the test description - Cookstyle changes * PlistBuddy and testing update - Add separate test cookbook for PlistBuddy resource - Add kitchen.yml for the above purpose - Modify and update plistbuddy resource/helpers * remove extra newline * add metadata file * edit metadata; add Berksfile * move Berksfile to correct location * add testing requirements for berks vendor * move kitchen file * Converge passing in test cookbook - Opportunistic cleanup of xcode test - some temp debugging info in resource definition - Rename name_property to command so as to not override action * Itempotence - Removed 'bool' prefix from boolean types, as that was somehow causing issues - Changed name_property to the path and removed that property - Use actual actions in the resource for the PlistBuddy commands * Fix false positive? - Not sure how the previous test was passing previously, but I adjusted the boolean value for the BazEntry test so that the signature input matches the output * Add logic for adding a value - The data type should only be used when adding a value to a plist. Otherwise, we don't need to use the data type * remove debugging; fix smoke tests * remove .kitchen.yml * bump version to 0.8.5 * unskip ChefSpec tests - they're passing * mark args_formatter as private method * Feature/macos user (#14) * first commit add_user recipe * Testing Refactor & macos_user resource - Create new testing cookbook that contains tests for both plistbuddy and macos_user resources. The hope here is to have a single testing cookbook that contains multiple suites and suite testing variations - Create new macos_user resource - contains single boolean 'true' settings for autologin and admin user. Still work to be done for admin user and all steps that need to be taken to acheive the task. * fix method call * fix another method call * user native ruby File class and not overriden * fix some minor issues with resource; add kcpassword file * Add OG Ruby kcpassword file helper module * slightly different approach for Kcpassword module * passing test * Fix up kcpassword library module, smoke tests - Modify Kcpassword helper module to use a method for magic bits. This isn't ideal, but it works for now - Update smoke tests so that john_jr's group ID is 20. This may not be correct, but setting as 20 until it is further investigated * opportunistic refactor of keep_awake recipe * Refactor testing cookbook layout - Consolodate testing suites into single default suite - Add tests for keep_awake recipe - Use more common examples to test PlistBuddy resource * move xcode test to test cookbook * Opportunistic bug fix for plistbuddy resource - Previously, the plistbuddy resource did not allow any keys with spaces unless they were used in the value itself. Now, you can use keys with spaces in the value property without needing to double-quote it - Also, fix the PlistBuddy executable string to be correct * revert kcpassword.rb helper to a671164 * fix incorrect PlistBuddy data type name * Fix kcpassword.rb and update plistbuddy UTs * Extract disabling screen saver to plistbuddy - Also, skip Xcode test temporarily * PlistBuddy idempotence - Remove systemsetup and pmset resource calls in keep_awake until they are made idempotent * update test and plist name * Implement binary plist conversion - Changes to binary plists via PlistBuddy must be converted back to binary since the change implicitly converts the file to xml. This change contains logic to convert back to binary if the file is detected to be binary in the first place. * attempts at idempotence using chef helper methods * early commit to get it on the remote * implement logic for plist return type to ruby data type * Add floating type value support A wild FAILING TEST appeared! ... HANKO used TDD! It's super effective! * move function * real idempotence! * passing all unit tests * update test cookbook name * update new_users integration tests * systemsetup idempotence * all smoke and unit tests passing * quick fix for timezone bug * remove kcpassword file as it is no longer needed * update path for test cookbook to be default repo name * Rename keep_awake_spec.rb to keep_awake_test.rb * Rename preferences_spec.rb to preferences_test.rb * Rename new_users_spec.rb to new_users_test.rb * fix typo * Use relative path for macos cookbook source * Improve readability of relative path for macos cookbook source * Bump version * Addressing changes in Pull Request #14 - Fix bug where screensaver was not properly being disabled, update tests accordingly - Rename plistbuddy resource to plist, including all related files and callers - Rename kcpassword helper to macos_user to match helper -> resource convention; fix top level namespace to be MacOS - Correctly name recipe unit tests - Implement plist resource into disable_software_updates.rb recipe - Add disable_software_updates.rb recipe to default kitchen suite and appropriate smoke tests - Remove relatively useless logic in systemsetup value property coercion * Implement binary plist conversion * Fix unit test and apply the Law of Demeter * update helper pattern to match current standard; include everywhere * remove helper reference in Xcode resource * bump version * update Xcode attribute to latest * extract xcode smoke tests to a different suite * update xcversion path for simulators test * update namespace again * refactor XcodeHelper modules in XCVersion, Xcode, and XCVersion modules updated methods to simplify site calls in resource * updated method calls for new modules * bump version * extract xcversion module to separate library file * add missing macos module * include parent module macos instead of child for xcode and xcversion * update available_simulator_versions to new method * bump version * add platform-specific smoke test for xcode * add xcode test recipe * update kitchen with xcode suite * refactor simulator method to call it's own available list of simulators * use new simulator method to find highest available version * move xcode prep work into the setup action * clear kitchen customizations * lazily evalutate ios simulator property * move lazy evaluation to simulator action in xcode resource * revert lazy execution * warn and retry if simulator list is empty * restore spacing * more whitespace * refactor highest_semantic_simulator method into class, smaller methods * implement simulator class * add more xcversion command methods * implement xcversion command methods * implement command methods correctly * add list methods for xcversion * implement xcversion list methods * implement install xcode correctly * reorder methods * add method to list installed xcodes * use more descriptive name for 'command' method * move where the space lives * implement installed xcodes command * implement install xcodes correctly * disable downloads prior to disabling software update check * Renamed name to device_name * Change name.rb to machine_name.rb to be similar with the apex automation cookbook. Instances of name are also all changed to machine_name. * Add new test recipe and smoke test for machine_name. * add disable-swu test suite * Bump up cookbook version numbers. * update kitchen test suite order, remove standalone swu testing * add sleep for El Capitan platform to avoid race condition this occurs when integrated with the macos-user test recipe * Improve README/Documentation (#23) * implement build definition badge and minor tweaks * Add descriptions and attribute lists for recipes * Remove 'description' label from recipe names * Bump version, add documentation dir * Fix up the last commit * Separate 10.12 and 10.13 build status * Add table for build status * Add plist resource documentation * Add Xcode documentation * bump version
2017-12-14 22:03:03 +03:00
Both the `macos::xcode` and `macos::configurator` recipes require a `credentials`
data bag with an `apple_id` data bag item. The item should contain valid Apple ID
credentials. For example:
Release plist and macos_user resources, new Xcode libraries, test cookbook and documentation. (#24) * first commit plistbuddy * all recipe/plist in macos * extract plistbuddy to resource * Straighten out unit tests - Correctly include modules - Correctly setup spec_helper - Correct unit test / respec setup * first passing test * add more data type tests * Most data types passing - Boolean values are working - Array and data type values are not - PlistBuddy "commands" (add, print, etc.) are passing * More testing - Skip Array and Dict types as their implementation will be more complicated - Add test for float type - Put the correct type in the test description - Cookstyle changes * PlistBuddy and testing update - Add separate test cookbook for PlistBuddy resource - Add kitchen.yml for the above purpose - Modify and update plistbuddy resource/helpers * remove extra newline * add metadata file * edit metadata; add Berksfile * move Berksfile to correct location * add testing requirements for berks vendor * move kitchen file * Converge passing in test cookbook - Opportunistic cleanup of xcode test - some temp debugging info in resource definition - Rename name_property to command so as to not override action * Itempotence - Removed 'bool' prefix from boolean types, as that was somehow causing issues - Changed name_property to the path and removed that property - Use actual actions in the resource for the PlistBuddy commands * Fix false positive? - Not sure how the previous test was passing previously, but I adjusted the boolean value for the BazEntry test so that the signature input matches the output * Add logic for adding a value - The data type should only be used when adding a value to a plist. Otherwise, we don't need to use the data type * remove debugging; fix smoke tests * remove .kitchen.yml * bump version to 0.8.5 * unskip ChefSpec tests - they're passing * mark args_formatter as private method * Feature/macos user (#14) * first commit add_user recipe * Testing Refactor & macos_user resource - Create new testing cookbook that contains tests for both plistbuddy and macos_user resources. The hope here is to have a single testing cookbook that contains multiple suites and suite testing variations - Create new macos_user resource - contains single boolean 'true' settings for autologin and admin user. Still work to be done for admin user and all steps that need to be taken to acheive the task. * fix method call * fix another method call * user native ruby File class and not overriden * fix some minor issues with resource; add kcpassword file * Add OG Ruby kcpassword file helper module * slightly different approach for Kcpassword module * passing test * Fix up kcpassword library module, smoke tests - Modify Kcpassword helper module to use a method for magic bits. This isn't ideal, but it works for now - Update smoke tests so that john_jr's group ID is 20. This may not be correct, but setting as 20 until it is further investigated * opportunistic refactor of keep_awake recipe * Refactor testing cookbook layout - Consolodate testing suites into single default suite - Add tests for keep_awake recipe - Use more common examples to test PlistBuddy resource * move xcode test to test cookbook * Opportunistic bug fix for plistbuddy resource - Previously, the plistbuddy resource did not allow any keys with spaces unless they were used in the value itself. Now, you can use keys with spaces in the value property without needing to double-quote it - Also, fix the PlistBuddy executable string to be correct * revert kcpassword.rb helper to a671164 * fix incorrect PlistBuddy data type name * Fix kcpassword.rb and update plistbuddy UTs * Extract disabling screen saver to plistbuddy - Also, skip Xcode test temporarily * PlistBuddy idempotence - Remove systemsetup and pmset resource calls in keep_awake until they are made idempotent * update test and plist name * Implement binary plist conversion - Changes to binary plists via PlistBuddy must be converted back to binary since the change implicitly converts the file to xml. This change contains logic to convert back to binary if the file is detected to be binary in the first place. * attempts at idempotence using chef helper methods * early commit to get it on the remote * implement logic for plist return type to ruby data type * Add floating type value support A wild FAILING TEST appeared! ... HANKO used TDD! It's super effective! * move function * real idempotence! * passing all unit tests * update test cookbook name * update new_users integration tests * systemsetup idempotence * all smoke and unit tests passing * quick fix for timezone bug * remove kcpassword file as it is no longer needed * update path for test cookbook to be default repo name * Rename keep_awake_spec.rb to keep_awake_test.rb * Rename preferences_spec.rb to preferences_test.rb * Rename new_users_spec.rb to new_users_test.rb * fix typo * Use relative path for macos cookbook source * Improve readability of relative path for macos cookbook source * Bump version * Addressing changes in Pull Request #14 - Fix bug where screensaver was not properly being disabled, update tests accordingly - Rename plistbuddy resource to plist, including all related files and callers - Rename kcpassword helper to macos_user to match helper -> resource convention; fix top level namespace to be MacOS - Correctly name recipe unit tests - Implement plist resource into disable_software_updates.rb recipe - Add disable_software_updates.rb recipe to default kitchen suite and appropriate smoke tests - Remove relatively useless logic in systemsetup value property coercion * Implement binary plist conversion * Fix unit test and apply the Law of Demeter * update helper pattern to match current standard; include everywhere * remove helper reference in Xcode resource * bump version * update Xcode attribute to latest * extract xcode smoke tests to a different suite * update xcversion path for simulators test * update namespace again * refactor XcodeHelper modules in XCVersion, Xcode, and XCVersion modules updated methods to simplify site calls in resource * updated method calls for new modules * bump version * extract xcversion module to separate library file * add missing macos module * include parent module macos instead of child for xcode and xcversion * update available_simulator_versions to new method * bump version * add platform-specific smoke test for xcode * add xcode test recipe * update kitchen with xcode suite * refactor simulator method to call it's own available list of simulators * use new simulator method to find highest available version * move xcode prep work into the setup action * clear kitchen customizations * lazily evalutate ios simulator property * move lazy evaluation to simulator action in xcode resource * revert lazy execution * warn and retry if simulator list is empty * restore spacing * more whitespace * refactor highest_semantic_simulator method into class, smaller methods * implement simulator class * add more xcversion command methods * implement xcversion command methods * implement command methods correctly * add list methods for xcversion * implement xcversion list methods * implement install xcode correctly * reorder methods * add method to list installed xcodes * use more descriptive name for 'command' method * move where the space lives * implement installed xcodes command * implement install xcodes correctly * disable downloads prior to disabling software update check * Renamed name to device_name * Change name.rb to machine_name.rb to be similar with the apex automation cookbook. Instances of name are also all changed to machine_name. * Add new test recipe and smoke test for machine_name. * add disable-swu test suite * Bump up cookbook version numbers. * update kitchen test suite order, remove standalone swu testing * add sleep for El Capitan platform to avoid race condition this occurs when integrated with the macos-user test recipe * Improve README/Documentation (#23) * implement build definition badge and minor tweaks * Add descriptions and attribute lists for recipes * Remove 'description' label from recipe names * Bump version, add documentation dir * Fix up the last commit * Separate 10.12 and 10.13 build status * Add table for build status * Add plist resource documentation * Add Xcode documentation * bump version
2017-12-14 22:03:03 +03:00
**Example:**
```json
{
"id": "apple_id",
"apple_id": "farva@spurbury.gov",
"password": "0k@yN0cR34m"
}
```
Release plist and macos_user resources, new Xcode libraries, test cookbook and documentation. (#24) * first commit plistbuddy * all recipe/plist in macos * extract plistbuddy to resource * Straighten out unit tests - Correctly include modules - Correctly setup spec_helper - Correct unit test / respec setup * first passing test * add more data type tests * Most data types passing - Boolean values are working - Array and data type values are not - PlistBuddy "commands" (add, print, etc.) are passing * More testing - Skip Array and Dict types as their implementation will be more complicated - Add test for float type - Put the correct type in the test description - Cookstyle changes * PlistBuddy and testing update - Add separate test cookbook for PlistBuddy resource - Add kitchen.yml for the above purpose - Modify and update plistbuddy resource/helpers * remove extra newline * add metadata file * edit metadata; add Berksfile * move Berksfile to correct location * add testing requirements for berks vendor * move kitchen file * Converge passing in test cookbook - Opportunistic cleanup of xcode test - some temp debugging info in resource definition - Rename name_property to command so as to not override action * Itempotence - Removed 'bool' prefix from boolean types, as that was somehow causing issues - Changed name_property to the path and removed that property - Use actual actions in the resource for the PlistBuddy commands * Fix false positive? - Not sure how the previous test was passing previously, but I adjusted the boolean value for the BazEntry test so that the signature input matches the output * Add logic for adding a value - The data type should only be used when adding a value to a plist. Otherwise, we don't need to use the data type * remove debugging; fix smoke tests * remove .kitchen.yml * bump version to 0.8.5 * unskip ChefSpec tests - they're passing * mark args_formatter as private method * Feature/macos user (#14) * first commit add_user recipe * Testing Refactor & macos_user resource - Create new testing cookbook that contains tests for both plistbuddy and macos_user resources. The hope here is to have a single testing cookbook that contains multiple suites and suite testing variations - Create new macos_user resource - contains single boolean 'true' settings for autologin and admin user. Still work to be done for admin user and all steps that need to be taken to acheive the task. * fix method call * fix another method call * user native ruby File class and not overriden * fix some minor issues with resource; add kcpassword file * Add OG Ruby kcpassword file helper module * slightly different approach for Kcpassword module * passing test * Fix up kcpassword library module, smoke tests - Modify Kcpassword helper module to use a method for magic bits. This isn't ideal, but it works for now - Update smoke tests so that john_jr's group ID is 20. This may not be correct, but setting as 20 until it is further investigated * opportunistic refactor of keep_awake recipe * Refactor testing cookbook layout - Consolodate testing suites into single default suite - Add tests for keep_awake recipe - Use more common examples to test PlistBuddy resource * move xcode test to test cookbook * Opportunistic bug fix for plistbuddy resource - Previously, the plistbuddy resource did not allow any keys with spaces unless they were used in the value itself. Now, you can use keys with spaces in the value property without needing to double-quote it - Also, fix the PlistBuddy executable string to be correct * revert kcpassword.rb helper to a671164 * fix incorrect PlistBuddy data type name * Fix kcpassword.rb and update plistbuddy UTs * Extract disabling screen saver to plistbuddy - Also, skip Xcode test temporarily * PlistBuddy idempotence - Remove systemsetup and pmset resource calls in keep_awake until they are made idempotent * update test and plist name * Implement binary plist conversion - Changes to binary plists via PlistBuddy must be converted back to binary since the change implicitly converts the file to xml. This change contains logic to convert back to binary if the file is detected to be binary in the first place. * attempts at idempotence using chef helper methods * early commit to get it on the remote * implement logic for plist return type to ruby data type * Add floating type value support A wild FAILING TEST appeared! ... HANKO used TDD! It's super effective! * move function * real idempotence! * passing all unit tests * update test cookbook name * update new_users integration tests * systemsetup idempotence * all smoke and unit tests passing * quick fix for timezone bug * remove kcpassword file as it is no longer needed * update path for test cookbook to be default repo name * Rename keep_awake_spec.rb to keep_awake_test.rb * Rename preferences_spec.rb to preferences_test.rb * Rename new_users_spec.rb to new_users_test.rb * fix typo * Use relative path for macos cookbook source * Improve readability of relative path for macos cookbook source * Bump version * Addressing changes in Pull Request #14 - Fix bug where screensaver was not properly being disabled, update tests accordingly - Rename plistbuddy resource to plist, including all related files and callers - Rename kcpassword helper to macos_user to match helper -> resource convention; fix top level namespace to be MacOS - Correctly name recipe unit tests - Implement plist resource into disable_software_updates.rb recipe - Add disable_software_updates.rb recipe to default kitchen suite and appropriate smoke tests - Remove relatively useless logic in systemsetup value property coercion * Implement binary plist conversion * Fix unit test and apply the Law of Demeter * update helper pattern to match current standard; include everywhere * remove helper reference in Xcode resource * bump version * update Xcode attribute to latest * extract xcode smoke tests to a different suite * update xcversion path for simulators test * update namespace again * refactor XcodeHelper modules in XCVersion, Xcode, and XCVersion modules updated methods to simplify site calls in resource * updated method calls for new modules * bump version * extract xcversion module to separate library file * add missing macos module * include parent module macos instead of child for xcode and xcversion * update available_simulator_versions to new method * bump version * add platform-specific smoke test for xcode * add xcode test recipe * update kitchen with xcode suite * refactor simulator method to call it's own available list of simulators * use new simulator method to find highest available version * move xcode prep work into the setup action * clear kitchen customizations * lazily evalutate ios simulator property * move lazy evaluation to simulator action in xcode resource * revert lazy execution * warn and retry if simulator list is empty * restore spacing * more whitespace * refactor highest_semantic_simulator method into class, smaller methods * implement simulator class * add more xcversion command methods * implement xcversion command methods * implement command methods correctly * add list methods for xcversion * implement xcversion list methods * implement install xcode correctly * reorder methods * add method to list installed xcodes * use more descriptive name for 'command' method * move where the space lives * implement installed xcodes command * implement install xcodes correctly * disable downloads prior to disabling software update check * Renamed name to device_name * Change name.rb to machine_name.rb to be similar with the apex automation cookbook. Instances of name are also all changed to machine_name. * Add new test recipe and smoke test for machine_name. * add disable-swu test suite * Bump up cookbook version numbers. * update kitchen test suite order, remove standalone swu testing * add sleep for El Capitan platform to avoid race condition this occurs when integrated with the macos-user test recipe * Improve README/Documentation (#23) * implement build definition badge and minor tweaks * Add descriptions and attribute lists for recipes * Remove 'description' label from recipe names * Bump version, add documentation dir * Fix up the last commit * Separate 10.12 and 10.13 build status * Add table for build status * Add plist resource documentation * Add Xcode documentation * bump version
2017-12-14 22:03:03 +03:00
Resources
---------
- [ARD (Apple Remote Desktop)](https://github.com/Microsoft/macos-cookbook/blob/master/documentation/resource_ard.md)
- [Certificate (security)](https://github.com/Microsoft/macos-cookbook/blob/master/documentation/resource_certificate.md)
- [Machine Name](https://github.com/Microsoft/macos-cookbook/blob/master/documentation/resource_machine_name.md)
- [Plist](https://github.com/Microsoft/macos-cookbook/blob/master/documentation/resource_plist.md)
- [Spotlight (mdutil)](https://github.com/Microsoft/macos-cookbook/blob/master/documentation/resource_spotlight.md)
- [Xcode](https://github.com/Microsoft/macos-cookbook/blob/master/documentation/resource_xcode.md)