sous-chefs-boneyard / mac_os_x Goto Github PK
View Code? Open in Web Editor NEWThis cookbook has been deprecated
Home Page: https://supermarket.chef.io/cookbooks/mac_os_x
License: Apache License 2.0
This cookbook has been deprecated
Home Page: https://supermarket.chef.io/cookbooks/mac_os_x
License: Apache License 2.0
We are utilizing old LWRP standards, but we need to change this to the new custom resource standard!
The resources in this cookbook were written many moons ago. It was a primitive time, when things like "testing" weren't done.
Laundry list of improvements this cookbook needs:
While we can't distribute OS X vagrant boxes for using Test Kitchen, internally at CHEF we have some, and we should use those to enable testing with Test Kitchen.
This cookbook includes two resources:
These are both awkward to type. They are also relatively simple LWRPs, and could be easily converted to subclass LWRPBase
. This would give better flexibility for making alias resources. I am proposing:
This gives clarity that they're for OS X. The old resource names would be aliases, and the attributes would remain.
Chef Reporting uses "state attributes" for reporting information about a Chef run. We should define those for the resources in this cookbook.
The LWRPs use inline resources, which gives us automatic why run mode support. This should be defined with the why_run_supported?
method defined to return true
.
As stated, LWRPs here use inline resources, but we don't use the use_inline_resources
method.
We set default actions using #initialize
rather than the default_action
method.
We need full ChefSpec coverage. This is related to Test Kitchen support.
We need adequate ServerSpec coverage. This is related to Test Kitchen support.
This cookbook must remain backwards compatible. We can achieve that through proper test coverage.
Tests must be written and verified before refactoring the resources begins.
The goal is to support the following OS X platform versions:
Initially, 10.9 and 10.10 will be supported (as I have VMware Fusion vagrant boxes for TK). 10.8 support can come if a) someone provides it or b) it just works without additional effort. To my knowledge, Apple hasn't dramatically changed the way the defaults(1)
system works.
We want a helper that takes values from attributes and checks to see if they...
This would require two method arguments:
This would be used for resources that require integers for their value.
I believe I'd like at least the delete action. Has there been any consideration of supporting other actions in mac_os_x_userdefaults?
This is my first look at this cookbook. I'll fork and see if I can contribute.
It would be nice to be able to set defaults for a specific user, or automatically assume the user running Chef via sudo. We can get this from Chef::Mixin::HomebrewUser
in Chef 12.
We should be replacing commands shell_out with Mixlib::ShellOut
I had to fiddle with the kbaccess recipe to make it use a key of AppleKeyboardUIMode with the global domain. Seems like the whole point of the global flag is to set the domain to NSGlobalDomain. While doing that, it seems easiest to just have the default domain be NSGlobalDomain.
Am I misunderstanding something, or would this work out?
Here is an example of an execute statement I haven't been able to put into the userdefaults resource and I believe I should be able to:
execute 'Disable automatic login' do
command 'defaults delete /Library/Preferences/com.apple.loginwindow '\
'autoLoginUser'
only_if 'defaults read /Library/Preferences/com.apple.loginwindow | '\
'grep "autoLoginUser"'
end
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.