summaryrefslogtreecommitdiff
path: root/spec/unit/provider
Commit message (Collapse)AuthorAgeFilesLines
* Update all auth email address from opscode.com and getchef.com to chef.io.Noah Kantrowitz2016-02-0238-47/+47
| | | Generated via git ls-files | xargs perl -pi -e "s/(Author.*?<[^@]+@)(?:opscode\\.com|getchef\\.com)(>)/\\1chef.io\\2/gi"
* Replace all Opscode copyrights with Chef Software.Noah Kantrowitz2016-02-0255-55/+55
| | | Created via git ls-files | xargs perl -pi -e "s/(Copyright.*?), Opscode(,)? Inc(\.)?/\\1, Chef Software Inc./gi"
* Copyright year update for 2016 and massive cleanup.Noah Kantrowitz2016-02-02108-111/+111
| | | Generated via git ls-files | xargs perl -pi -e "s/[Cc]opyright (?:\([Cc]\) )?((?\!$(date +%Y))\\d{4})(-\\d{4})?([, ][ \d]+)*(,|(?= ))/Copyright \\1-$(date +%Y),/g"
* Fix nil with properties:John Keiser2016-01-271-21/+17
| | | | | | 1. Warn when default values are invalid. 2. Never validate nil (on set or get) if there is no default. 3. Emit "will be invalid in Chef 13" warning when setting an invalid nil value.
* Merge pull request #4422 from chef/tm/apt_updateThom May2016-01-271-0/+113
|\ | | | | Add an apt_update resource
| * respond to review commentsThom May2016-01-221-0/+20
| |
| * Dependency inject file locationsThom May2016-01-211-3/+33
| |
| * Add periodic action as the defaultThom May2016-01-201-0/+20
| |
| * Add an apt_update resourceThom May2016-01-201-0/+43
| |
* | zypper multipackage patchLamont Granquist2016-01-251-52/+26
| |
* | Added support for Zypper to install multiple packages at onceYorgos Saslis2016-01-251-0/+36
|/ | | | See #3570
* Autofixing Style/PercentLiteralDelimeterslcg/percentliteraldelimetersLamont Granquist2016-01-183-3/+3
| | | | | | See chef/chefstyle#11 for analysis and discussion. We select '{}' since audit of our source code shows that is the most common, and that used to be the dominant learning paradigm (e.g. in ruby 1.9 pickaxe book.
* fix chefstyle failuresLamont Granquist2016-01-151-2/+2
| | | | | | | | autocorrects some merges that will be broken when the next chefstyle is released. also runs chefstyle after the travis tests, because i'd rather know how the code is broken rather than how its not pretty.
* adding functional tests for chocolatey providerchoco_func_testsMatt Wrock2016-01-141-6/+19
|
* Use double quotes by defaultThom May2016-01-14108-1338/+1338
| | | | | | | This is an entirely mechanically generated (chefstyle -a) change, to go along with chef/chefstyle#5 . We should pick something and use it consistently, and my opinion is that double quotes are the appropriate thing.
* autocorrecting Style/TrailingCommalcg/trailing_commaLamont Granquist2016-01-1320-138/+138
| | | | chefstyle -a fixed 1044 occurrances
* fix Lint/DuplicatedKeylcg/duplicated-keysLamont Granquist2016-01-131-3/+6
| | | | | | | | | | | so, this is a bit special... the API for "priority" is clearly broken. but this broken API comes from the service resource itself which appears to have been broken by design since at least 2010. just fixing the code for how it behaves and dropping in FIXMEs for now, since this uncovered a fairly massive API-breaking yak.
* Merge pull request #4384 from chef/lcg/really-fix-copsLamont Granquist2016-01-121-8/+8
|\ | | | | really fix cops
| * really fix copslcg/really-fix-copsLamont Granquist2016-01-121-8/+8
| |
* | Merge pull request #4378 from chef/choco_editsMatt Wrock2016-01-121-3/+31
|\ \ | | | | | | assert candidates exist for alternate sources and when pinning versions
| * | assert candidates exist for alternate sources and when pinning versionsMatt Wrock2016-01-121-3/+31
| | |
* | | Merge pull request #4375 from chef/no_version_detectMatt Wrock2016-01-121-69/+5
|\ \ \ | |_|/ |/| | fixes #4354 and fixes #4372 stop trying to auto detect versions for exe installers
| * | fexes #4354 and fiexs #4372 stop trying to auto detect versions for exe ↵no_version_detectMatt Wrock2016-01-111-69/+5
| |/ | | | | | | installers
* | Merge pull request #4381 from chef/lcg/useless-to-sLamont Granquist2016-01-122-4/+4
|\ \ | | | | | | chefstyle: fix Lint/StringConversionInInterpolation
| * | chefstyle: fix Lint/StringConversionInInterpolationLamont Granquist2016-01-122-4/+4
| |/ | | | | | | useless use of `"#{foo.to_s}"`
* | fix some lint copsLamont Granquist2016-01-127-7/+7
|/ | | | | | | | | fixes the following offenses: 46 Lint/EndAlignment 21 Lint/BlockAlignment 3 Lint/SpaceBeforeFirstArg 1 Lint/DefEndAlignment
* Merge pull request #4106 from chef/lcg/chocolatey-packageLamont Granquist2016-01-112-1/+423
|\ | | | | add chocolatey_package to core chef
| * chocolatey multipackage providerlcg/chocolatey-packageLamont Granquist2016-01-082-1/+423
| |
* | Convert all uses of Chef::REST to Chef::ServerAPItm/no_more_restThom May2016-01-111-2/+2
|/ | | | | | | In the process, stop auto-expanding JSON in the HTTP client, and let individual classes control that themselves. Fixes #2737, Fixes #3518
* Merge pull request #4321 from chef/service_userMatt Wrock2015-12-291-27/+18
|\ | | | | fix run_as_user of windows_service
| * fixes #3521 correcting format of user name passed to policy apis and does ↵Matt Wrock2015-12-291-27/+18
| | | | | | | | not clobber existing service rights of other users
* | Added profile provider for OS XNate Walck2015-12-171-0/+267
| | | | | | | | Fixed resource to use let
* | Merge pull request #4320 from chef/jk/fix-package-nil-warningJay Mundrawala2015-12-161-5/+1
|\ \ | |/ |/| Fix failing package unit test
| * Fix failing package unit testjk/fix-package-nil-warningJohn Keiser2015-12-161-5/+1
| |
* | fixing post merge test breaksMatt Wrock2015-12-151-2/+2
| |
* | non msi packages must explicitly provide a source attribute on installMatt Wrock2015-12-151-5/+15
|/
* Use properties in package resourcesjk/package-propertiesJohn Keiser2015-12-152-2/+0
|
* Merge pull request #4193 from chef/mwrock/packageSalim Alam2015-12-083-36/+572
|\ | | | | adds support for installer types inno, nsis, wise and installshield to windows_package resource
| * adds support to installer types inno, nsis, wise and installshield top the ↵Matt Wrock2015-12-073-36/+572
| | | | | | | | windows_package resource
* | restore handling of dpkg -s returns codes (w/tests)lcg/dpkg-s-return-codesLamont Granquist2015-12-071-3/+38
|/ | | | | | | | | | | | | | | | Previously dpkg -s would allow a 0 or 1 exit status and it wasn't entirely clear why this was so either from the code or the tests. This restores throwing an exception if we are outside of the [0,1] range, and then adds tests for both behaviors: - on old ubuntu/debian we get an exit(0) and output on stdout if the file is not installed - on newer ubuntu/debian we get an exit(1) and output on stderr if the file is not installed Added tests for both those cases, and the case where dpkg -s does some other kind of exitcode barf and we should raise.
* add unit test for a_to_sLamont Granquist2015-12-021-0/+4
|
* dpkg multipackage and bonus fixesLamont Granquist2015-12-022-50/+43
| | | | | | | | - multipackages dpkg_package - fixes edge conditions in load-current-resource around purging/removing packages that threw errors before - fixes the ability to purge packages that have been removed - adds a lot of functional tests for dpkg_package
* Correcting regex for upstart_stateJustin Seubert2015-11-231-0/+19
|
* dpkg provider cleanupLamont Granquist2015-11-201-85/+138
| | | | | | | | | | | | | | - :update and :install are now treated the same way and throw the same exceptions - :remove and :purge don't require the source at all, so don't do any checking on that - fix some convoluted side-effecty logic in load_current_resource - load_current_resource now correctly gets the dpkg state on :remove and :purge when the file does not exist (pretty sure the old logic did not) - fixed the FIXME about using en_US.UTF-8 (the default for shell_out!) - just use shell_out! to throw exceptions - clean up all the specs and remove all the instance vars from the code
* WMF 5 RTM and Win 10 Threshold 2 allow the RefreshMode to be enabled.Steven Murawski2015-11-181-41/+62
|
* Add reboot notification to dsc_resourceSteven Murawski2015-11-181-3/+21
|
* base package provider fixesLamont Granquist2015-11-172-366/+499
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * removes the mutation of the new_resource.version * adds package_class_supports_arrays for multipackage providers * cleans up the package resource initializer and sets the package_name correctly through the accessor method. By mutating new_resource.version we were destroying the original intent of what the user was requesting. This is a bug that must be fixed. Generally, subclasses will be able to get the correct information they need through either the version argument they were passed in install_package(name, version) instead, or through their `#target_version_array` method. If this breaks anything then those providers need bugfixes as well (since this is a change to an internal API accessible only to subclassing, and there are backwards compatible and correct ways to get the information, this is *not* a SemVer violating change). See the fix I made to the OpenBSD provider to preserve the same semantics, avoid using new_resource.version where it was inappropriate, and make the code more symmetrical where before substantially different looking code in install_package and remove_package had exactly the same ultimate effect. The package_class_supports_arrays 'DSL' for writing multipackage providers coerces the arguments to the virtual methods (e.g. install_package) into arrays, even if the user is only requesting a single package install. This removes most of the `is_a?(Array)` checks from the implementation subclasses. The cleanup of the initializer is similarly necessary so that we can use Chef 12.5 coercions to make the package_name and version arguments accept string, but always be Arrays. This should eliminate the rest of the need to write `is_a?(Array)` code all over the package provider implementations.
* Merge pull request #4040 from chef/tm/live_execute_streamingThom May2015-11-122-36/+94
|\ | | | | Implement live streaming for execute resources
| * respond to review commentsThom May2015-11-091-64/+70
| | | | | | | | | | | | | | | | | | | | the logic is now: if the resource is not sensitive, and if it's explicitly requested to be streamed or if the log level is info or debug, then we'll consider streaming it. If we're configured to send the output to the events stream, we'll do so. Otherwise, if we're not daemonized and have a TTY, we'll go to STDOUT
| * Implement code review comments and fix failing testsThom May2015-11-091-2/+2
| |