Markus Reiter
24ae318a3d
Move type annotations into files.
2020-10-10 14:59:39 +02:00
Maxim Belkin
a6d29894d9
cleanup: fix and reuse portable ruby logic.
...
Align the logic in `cleanup_portable_ruby` with that in `ruby.sh`.
Co-authored-by: Maxim Belkin <maxim.belkin@gmail.com>
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-09-03 09:43:41 +01:00
Markus Reiter
5402500635
Refactor and document Cleanup
.
2020-08-17 19:11:31 +02:00
Mike McQuaid
5dd8ead51a
Rename Formula#installed? to Formula#latest_version_installed?
...
This naming has always been a bit weird and confusing so let's change
it and provide a `compat` fallback for later deprecation.
2019-12-03 11:42:42 +00:00
Issy Long
341ea60807
Auto-fix Style/RedundantBegin offenses
...
- This also required auto-fixes for Layout/EmptyLinesAroundBlockBody and
Layout/InconsistentIndentation once the auto-fixer had got rid of the
"redundant begin"s.
2019-10-13 16:04:27 +01:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files.
2019-04-20 13:27:36 +09:00
Mike McQuaid
79f3ff0a4e
cleanup: also consider ctime on prunes.
...
If this is an old tarball then we may end up removing it otherwise if
we've respected the `mtime` from the server on download.
2019-01-21 21:35:24 +00:00
Mike McQuaid
8144667a71
Cleanup periodically if HOMEBREW_INSTALL_CLEANUP is set.
...
This will become the default in a later version of Homebrew but has an
opt-out through HOMEBREW_NO_INSTALL_CLEANUP.
Also, always cleanup files older than 120 days and set the general
default value for "old" logs, casks etc. to 30 days.
2019-01-03 16:23:44 +00:00
Markus Reiter
a9128c543c
Use ActiveSupport’s #days
.
2018-10-07 23:10:56 +02:00
Mike McQuaid
78eba5b815
Autofix RuboCop RSpec failures
2018-09-20 13:36:42 +01:00
Mike McQuaid
7615d3a812
Improve writable directory handling
...
Consolidate the handling of which directories need to exist and which
need to be writable. Additionally, add a fatal check for formula
installations to ensure that any directories that need to be writable
are so before attempting an installation.
Fixes #4626 .
2018-09-06 18:38:43 +01:00
Markus Reiter
a84a1c63db
Rename Hbc
module to Cask
.
2018-09-06 09:30:52 +02:00
commitay
88bf60d589
Merge pull request #4815 from commitay/cargo-cache
...
rust/cargo: enable caching
2018-09-05 21:22:03 +10:00
Mike McQuaid
90b3a13909
cask: move cask/lib/hbc/* to cask/*.
...
Fix the load path, requires and some filenames accordingly.
2018-09-04 09:56:57 +01:00
commitay
11a6413fd0
cleanup: remove cargo_cache
2018-09-04 12:00:57 +10:00
Dominyk Tiller
b333f7abe6
cleanup_spec: test go_cache cleanup
2018-08-29 13:16:56 +01:00
Dominyk Tiller
7307d2558f
Merge pull request #4643 from chrmoritz/gclient_cache_cleanup
...
add new gclient_cache folder to cleanup
2018-08-13 23:18:46 +01:00
Markus Reiter
55cde526a8
Deprecate brew cask cleanup
.
2018-08-13 20:09:34 +02:00
Markus Reiter
8b5fa6824b
Fix brew cleanup
.
2018-08-11 18:03:49 +02:00
Christian Moritz
6302d622e3
add new gclient_cache folder to cleanup
2018-08-09 00:37:58 +02:00
Markus Reiter
03b93da296
Use option parser for brew cleanup
.
2018-08-08 13:11:16 +02:00
Markus Reiter
921c6a33dd
Refactor Cleanup
.
2018-08-08 10:40:22 +02:00
Markus Reiter
4a48297d1c
Fix cleanup for files with --
.
2018-08-06 15:40:05 +02:00
Mike McQuaid
9fca172d03
Fix HOMEBREW_RUBY_WARNINGS="-w"
...
Fix various circular requirements, method redefinitions, etc.
2018-04-07 20:28:56 +01:00
Mike McQuaid
262666c828
cleanup_spec: add nicer prune matcher alias.
2018-03-28 11:20:57 +01:00
Mike McQuaid
5e1806e796
test: rubocop-rspec style auto-corrects.
...
There’s too many warnings to start enabling `rubocop-rspec` by default
but let’s at least apply the cleanups it does automatically.
2018-03-25 13:30:37 +01:00
Xu Cheng
d3fce64efb
cleanup: fix removing lock files on NFS
...
If the underneath file system is a Network File System,
`brew cleanup` will fail to remove the lock files with following error
message:
Error: Bad file descriptor @ rb_file_flock - /path/to/the/lock_file
This commit fixes such issue and adds the corresponding test case.
2018-03-14 21:50:53 +08:00
mansimarkaur
01714b17ee
Used let for sec_in_a_day and removed redundant after(:each) block
2017-08-27 01:18:41 +05:30
mansimarkaur
5f7a93bceb
Corrected test name
2017-08-27 01:18:41 +05:30
mansimarkaur
ec30de69c3
Added tests for existence of files
2017-08-27 01:18:41 +05:30
mansimarkaur
e7c2efa42f
Corrected disk_cleanup_size test
2017-08-27 01:18:41 +05:30
mansimarkaur
6b5e4bb938
Use let over instance_var
2017-08-27 01:18:40 +05:30
mansimarkaur
86f7d208d0
Added tests for prune?
2017-08-27 01:18:40 +05:30
mansimarkaur
134539aa55
Added tests for cleaning up old files in HOMEBREW_CACHE
2017-08-27 01:18:40 +05:30
mansimarkaur
265d43444b
improved prune all test
2017-08-27 01:18:40 +05:30
mansimarkaur
5e17d63010
Added tests for ARGV prune 'all'
2017-08-27 01:18:40 +05:30
mansimarkaur
c1799bb497
Added tests for disk_cleanup and unremovable kegs
2017-08-27 01:18:40 +05:30
Markus Reiter
2ad3a87045
Silence all specs by default.
2017-07-29 20:25:37 +02:00
Joshua McKinney
48fdd163bc
Brew cleanup: Continue on error removing keg
...
Fixes #2355
Create unremovable_kegs instance var
Check cellar cleanup failure after full cleanup completes
Use module_function in Homebrew::Cleanup as we never instantiate the
class
2017-03-31 01:44:04 -05:00
Markus Reiter
e84e7bd591
Convert Homebrew::Cleanup test to spec.
2017-02-27 17:04:40 +01:00