summaryrefslogtreecommitdiff
path: root/lib/chef/resource/launchd.rb
Commit message (Collapse)AuthorAgeFilesLines
* Minor fixes from PR reviewTim Smith2018-06-131-2/+2
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Add more property descriptions to resourcesTim Smith2018-06-121-98/+205
| | | | | | Slowly we'll get them all. Signed-off-by: Tim Smith <tsmith@chef.io>
* Set desired_state: false on several propertiesdesired_stateTim Smith2018-04-271-2/+2
| | | | | | These are not state attributes, but we're treating them like state attributes. Signed-off-by: Tim Smith <tsmith@chef.io>
* Remove platfom restrictions in provides and don't require providersTim Smith2018-03-071-1/+1
| | | | | | Don't require providers in the resources since we map these automatically. Also remove or simplify the platform restrictions in the provides lines in the resources. We're not really getting anything from these the way we wire up resources. Signed-off-by: Tim Smith <tsmith@chef.io>
* Add new introduced and description resource properties to many resourceTim Smith2018-02-141-3/+3
| | | | | | Not all of them, but a good chunk. Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge pull request #6698 from chef/launchdThom May2017-12-201-4/+2
|\ | | | | Modernize launchd resource
| * Modernize launchd resourcelaunchdTim Smith2017-12-191-4/+2
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | Add descriptions and @since comments to all resourcesTim Smith2017-12-191-0/+3
|/ | | | | | From the docs site Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge pull request #5822 from gbatye/launchd_limit_load_sessionLamont Granquist2017-04-041-1/+1
|\ | | | | Launchd limit_load_to_session_type accepts Array or String
| * launchd:limit_load_to_session_type accepted Array and StringGregory Batye2017-02-171-1/+1
| | | | | | | | Signed-off-by: Gregory Batye <gbatye@fb.com>
* | Merge pull request #5854 from mikedodge04/ld_restartThom May2017-04-041-1/+1
|\ \ | | | | | | Adding restart action to launchd resource

| * | Adding restart action to launchd resourceMike Dodge2017-03-021-1/+1
| |/ | | | | | | | | | | | | At first we wanted only support native actions with the launchd resource and launchd does not have the concept of restart. You would unload and load. But not having a restart was causing more confusion to people.
* | Chef-13: remove deprecated launchd resource hash propertyLamont Granquist2017-03-311-12/+0
|/ | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Deprecate creating properties whose names are already methodsadamleff/warn-on-dangerous-property-namesAdam Leff2017-01-181-1/+13
| | | | | | | | | | | | | | | | When creating a resource, a user can create a property that is the same name as an already-existing Ruby method, such as `#hash`. In the case of the `#hash` method, this can cause issues when attempting to adding resources to other data structures, such as Arrays or Hashes. In other examples, this could cause unexpected behavior that is incredibly difficult to troubleshoot. This change adds a deprecation warning in the case where a user adds a property to a resource that the resource instance already responds to. If y'all are OK with this approach, I'll be happy to write up the deprecation doc for this for docs.chef.io. Signed-off-by: Adam Leff <adam@leff.co>
* fix Lint/UnifiedInteger copLamont Granquist2016-11-151-2/+2
| | | | | | believe this becomes necessary for ruby 2.4/3.0 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Respond to review comments and chefstyletm/rescue_5115Thom May2016-11-101-13/+12
| | | | Signed-off-by: Thom May <thom@chef.io>
* Code style fixes; :lipstick:Andrew Burns2016-11-101-1/+1
|
* launchd: start_calendar_interval validity checkingAndrew Burns2016-11-101-1/+42
| | | | | | | | | | | | | | | | | | | | | StartCalendarInterval has some gotchas so we coerce it to sanity check. According to `man 5 launchd.plist`: StartCalendarInterval [is a] <dictionary of integers or array of dictionaries of integers> ... Missing arguments are considered to be wildcard. What the man page doesn't state, but what was observed (OSX 10.11.5, launchctrl v3.4.0) is that key that are specified, _but with invalid values, will also be silently treated as a wildcard values. This means that an entry like: { "Hour"=>0, "Weekday"=>"6-7"} will not just run on midnight of Sat and Sun, rather it will run _every_ midnight. We check to make sure that the values are integers and not strings, adhering to the manpage documentation. This also ensures that only keys that StartCalendarInterval supports will be passed. This eliminates passing a key (like `:hour` or `'hour') and thinking it works when in reality launchd is just treating it as a wildcard. NOTE: This is a "breaking" change in that: it will break existing cookbooks that are using the current docs: https://docs.chef.io/resource_launchd.html (See start_calendar_interval); however the generated plist doesn't appear to actually do what was intended anyway.
* String to Array launchd:limit_load_to_session_type (#5424)Erik Gomez2016-11-081-1/+1
| | | Mac: Ensure that launchd limit_load_to_session_type is properly handled
* Add Hash type to launchd:keep_aliveErik Gomez2016-08-081-1/+1
|
* bundle exec chefstyle -aMike Dodge2016-02-151-6/+6
|
* made requested changesMike Dodge2016-02-151-365/+63
|
* fixed rebaseMike Dodge2016-02-151-1/+1
|
* added specsMike Dodge2016-02-151-6/+10
|
* launchdMike Dodge2016-02-151-0/+402