summaryrefslogtreecommitdiff
path: root/lib/chef/provider/remote_file
Commit message (Collapse)AuthorAgeFilesLines
* Add http_options property to remote_filelcg/remote-file-http-optionsLamont Granquist2021-09-221-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* use autoloading for many required gemsmwrock2020-09-083-8/+15
| | | | Signed-off-by: mwrock <matt@mattwrock.com>
* Use .match? not =~ when match values aren't necessaryTim Smith2020-06-111-1/+1
| | | | | | Autocorrected from RuboCop Performance which is now smart enough to detect when you use the match and when you don't. Using match? does not create any objects so it's slightly faster and uses less memory. Signed-off-by: Tim Smith <tsmith@chef.io>
* Update to ssl_verify_mode on remote_filePhil Dibowitz2020-05-271-6/+1
| | | | | | | | | | | | | | | So it turns out the `berkshelf` has been passing it's entire `options` hash into `Chef::HTTP` this whole time, which, we should probably fix. However, one of those options was `:ssl_verify_mode`. We ignore entries in the `options` hash we don't recognize so this was fine, but suddenly we recognize it. But we expected it to be class, and they're passing in symbols. Whoops! This makes that all work and puts the symbol->class conversion inside of `Chef::HTTP`. Signed-off-by: Phil Dibowitz <phil@ipom.com>
* Fix incorrect ruby in the ssl_verify_mode checkTim Smith2020-05-271-2/+2
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Chefstyle updatesTim Smith2020-05-271-1/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Add ssl_verify option for remote_filePhil Dibowitz2020-05-181-0/+8
| | | | | | | | | | | | | | | | Different servers have different https requirements and enforcing the API policy on all `remote_file` resources isn't reasonable. The logic around the HTTP clients and policies in Chef is... complex. This approach seemed like the best one, but I'm open to others. By default here if the user specifies nothing, `remote_file`'s http clients will fall back to the API policy, otherwise, it'll use whatever the specify. This fixes #8897 Signed-off-by: Phil Dibowitz <phil@ipom.com>
* Remove copyright dateslcg/remove-copyright-datesLamont Granquist2020-04-133-3/+3
| | | | | | | | Legally incredibly dubious, particularly since we don't follow it strictly as policy, and we have git history instead, which does it right. This is just a waste of time and a cargo cult. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* add require for CGIlcg/unescapeLamont Granquist2020-02-203-0/+3
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix ruby 2.7 URI.unescape deprecationLamont Granquist2020-02-203-5/+5
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Add chef-utils gem with various recipe DSL helpersLamont Granquist2019-11-082-3/+3
| | | | | | | | | | | | | This is the implementation of [RFC-087](https://github.com/chef-boneyard/chef-rfc/blob/master/rfc087-distro-sugar-helpers.md) although some of the specifics have been iterated on and changed. The documentation will be in the [README.md](https://github.com/chef/chef/tree/master/chef-utils/README.md) once this is merged. While this PR mostly moves chef-sugar utilities into core-chef via this chef-utils gem, the scope of the chef-utils gem should be considered larger than just that. As an example this PR moves the Mash class into this gem for reuse in ohai as well. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/RegexpLiteralLamont Granquist2019-07-052-2/+2
| | | | | | | given how many regexps we have with /'s in the match this seems like a very good one. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/NegatedIfLamont Granquist2019-07-051-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/EmptyLineAfterGuardClauseLamont Granquist2019-07-021-0/+1
| | | | | | | i like this one, gives visual priority to returns or raises that are buried in the middle of things. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* This hits the ones that are most frequently required.lcg/require-idempotencyLamont Granquist2019-05-206-11/+11
| | | | | | | | | Stops the kernel from scanning through all the activated gems every time in order to resolve names into pathnames. See rubygems/rubygems#2762 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix a bunch of weirdly mangled require linesLamont Granquist2019-05-085-5/+5
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Convert require to require_relativeLamont Granquist2019-05-087-17/+17
| | | | | | | This gives a speed boost since rubygems does not have to scan through every gem in the gemset in order to find the file. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* change HTTPServerException to HTTPClientException for ruby 2.6Lamont Granquist2019-01-031-1/+1
| | | | | | includes backcompat for 2.5 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/PreferredHashMethodsLamont Granquist2018-07-021-2/+2
| | | | | | | absolutely hard requirement on the fixes that went into chef-config 2.2.11, so the floor of that gem is bumped up. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/HashSyntaxLamont Granquist2018-07-021-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* mechanical conversion of most debug log statements to traceThom May2018-03-265-10/+12
| | | | Signed-off-by: Thom May <thom@chef.io>
* RemoteFile: unlink tempfile when using cache control shows unchangedlcg/remote_file_cleanup_tempfilesLamont Granquist2018-02-021-3/+8
| | | | | | | | We can get back a nil tempfile from the streaming downloader which means that we need to clean up our own tempfile since the base file provider will not do it for us. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Fixed/added specs for LogonSession changesnimisha2018-01-241-1/+1
| | | | Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
* Brought back Chef::Win32::Security functional test for running as a non ↵nimisha2018-01-241-1/+1
| | | | | | admin user Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
* allow injecting tempfiles into Chef::HTTPlcg/chef-http-inject-tempfileLamont Granquist2017-12-191-2/+3
| | | | | | | | | use this to inject the tempfile from Chef::FileContentManagement::Tempfile closes #2401 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Fixing specsnimisha2017-09-051-1/+1
| | | | Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
* Added define_resource_requirement and some other validationsnimisha2017-09-051-0/+3
| | | | Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
* Alternate user local logon authenticationnimisha2017-09-051-5/+1
| | | | Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
* Access remote_file resource source files as alternate user on Windowsadamedx2017-09-051-5/+22
| | | | | Conflicts: spec/support/shared/functional/execute_resource.rb
* Handling Errno::ETIMEDOUT (#5358)Nimisha Sharad2016-09-221-1/+1
| | | | | | | | * Handling Errno::ETIMEDOUT * spec for Errno::ETIMEDOUT * rubocop fix
* fix Style/BlockDelimiters, Style/MultilineBlockLayout and 0.42.0 engine upgradeLamont Granquist2016-08-172-4/+4
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* removing a superflous assignment in the sftp providerJohn Kerry2016-04-051-2/+0
|
* removing an unnecessary comment with an incorrect referenceJohn Kerry2016-04-051-1/+0
|
* updating copyright infoJohn Kerry2016-04-051-2/+2
|
* removing zombied references and migrating validation logic directly into the ↵John Kerry2016-04-051-23/+13
| | | | validate_path code.
* fixing rubocop violations, mostly string format, in the sftp provider and ↵John Kerry2016-03-251-10/+10
| | | | spec files
* Finishing off the sftp unit tests. Added some checks to the sftp provider to ↵John Kerry2016-03-242-15/+26
| | | | maintain the precedent set by the ftp provider
* Adding base implementation and the start of unit test coverageJohn Kerry2016-03-232-0/+77
|
* Adding the provider and spec files for sftpJohn Kerry2016-03-231-0/+32
|
* - Restore previous behavior where we use the user/pass from the URI, if present.nls/proxy-cleanupChris Doherty2016-03-171-1/+1
| | | | - s/ChefConfig::Config.proxy_uri/Chef::Config.proxy_uri/
* Make handling of proxies more consistentNathan L Smith2016-03-171-12/+1
| | | | | | | | | | * Always use `*_proxy` environment variables. * Make a `ChefConfig::Config.proxy_uri` method that gets used by `Chef::Provider::RemoteFile::FTP` and `Chef::HTTP::BasicClient`. * Remove `env` method from `Chef::HTTP::BasicClient` (using `stub_const("ENV", ...)` in specs instead.) * Remove `http_proxy_user` and `http_proxy_pass` methods from `Chef::HTTP::BasicClient` (replaced by functionality in `ChefConfig`.)
* Merge pull request #4658 from chef/tm/remote_file_download_progress11.9Thom May2016-03-151-1/+19
|\ | | | | Remote file download progress
| * Enable progress output to be configuredtm/remote_file_download_progressThom May2016-03-041-2/+6
| | | | | | | | Add tests around progress output and tidy up
| * Merge branch 'remote-file-download-progress' of ↵Thom May2016-03-031-1/+15
| |\ | | | | | | | | | https://github.com/brandocorp/chef into tm/remote_file_download_progress
| | * new doc formatter event, remove progress barBrandon Raabe2015-03-201-5/+11
| | |
| | * pass resource as an option to allow access to resource eventsBrandon Raabe2015-03-181-2/+1
| | |
| | * add progress interval, add ProgressBar classBrandon Raabe2015-03-151-0/+1
| | |
| | * add value of show_progress to the http_client_optsBrandon Raabe2015-03-151-0/+8
| | |
* | | chefstyle Style/AndOr fixesLamont Granquist2016-03-143-4/+4
|/ / | | | | | | | | this is part of our informal style guide, lets make it formal since clearly its not getting followed very well.
* | autofixing whitespace copsLamont Granquist2016-02-053-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4174 Style/SpaceInsideHashLiteralBraces 1860 Style/SpaceAroundOperators 1336 Style/SpaceInsideBlockBraces 1292 Style/AlignHash 997 Style/SpaceAfterComma 860 Style/SpaceAroundEqualsInParameterDefault 310 Style/EmptyLines 294 Style/IndentationConsistency 267 Style/TrailingWhitespace 238 Style/ExtraSpacing 212 Style/SpaceBeforeBlockBraces 166 Style/MultilineOperationIndentation 144 Style/TrailingBlankLines 120 Style/EmptyLineBetweenDefs 101 Style/IndentationWidth 82 Style/SpaceAroundBlockParameters 40 Style/EmptyLinesAroundMethodBody 29 Style/EmptyLinesAroundAccessModifier 1 Style/RescueEnsureAlignment