diff options
| author | Mike McQuaid | 2018-01-18 08:29:56 +0000 |
|---|---|---|
| committer | GitHub | 2018-01-18 08:29:56 +0000 |
| commit | 892e1b5b4fb2ec1b71b9486d65a8932f713af8a0 (patch) | |
| tree | 6767f47c5eaaa3681a73cf0375fec702f7f3eb9a /Library/Homebrew/compat/gpg.rb | |
| parent | e97b0ce00fc76b4fa32394279e7d84ed098b2164 (diff) | |
| parent | 2cbce1fbf0a7a361f2be8b3545998f1a36ab3588 (diff) | |
| download | brew-892e1b5b4fb2ec1b71b9486d65a8932f713af8a0.tar.bz2 | |
Merge pull request #3652 from MikeMcQuaid/add-more-deprecations-disables
Add more deprecations, disable some existing ones.
Diffstat (limited to 'Library/Homebrew/compat/gpg.rb')
| -rw-r--r-- | Library/Homebrew/compat/gpg.rb | 36 |
1 files changed, 7 insertions, 29 deletions
diff --git a/Library/Homebrew/compat/gpg.rb b/Library/Homebrew/compat/gpg.rb index 01880f71e..e802d939c 100644 --- a/Library/Homebrew/compat/gpg.rb +++ b/Library/Homebrew/compat/gpg.rb @@ -4,46 +4,24 @@ module Gpg module_function def executable + odeprecated "Gpg.executable", 'which "gpg"' which "gpg" end def available? + odeprecated "Gpg.available?", 'which "gpg"' File.executable?(executable.to_s) end - def create_test_key(path) - odie "No GPG present to test against!" unless available? - - (path/"batch.gpg").write <<~EOS - Key-Type: RSA - Key-Length: 2048 - Subkey-Type: RSA - Subkey-Length: 2048 - Name-Real: Testing - Name-Email: testing@foo.bar - Expire-Date: 1d - %no-protection - %commit - EOS - system executable, "--batch", "--gen-key", "batch.gpg" + def create_test_key(_) + odeprecated "Gpg.create_test_key" end def cleanup_test_processes! - odie "No GPG present to test against!" unless available? - - gpgconf = Pathname.new(executable).parent/"gpgconf" - - system gpgconf, "--kill", "gpg-agent" - system gpgconf, "--homedir", "keyrings/live", "--kill", - "gpg-agent" + odeprecated "Gpg.cleanup_test_processes!" end - def test(path) - create_test_key(path) - begin - yield - ensure - cleanup_test_processes! - end + def test(_) + odeprecated "Gpg.test" end end |
