Douglas Eichelberger
827fc87cde
Enable more typing
2023-03-15 14:29:15 -07:00
EricFromCanada
dfc9906184
internal messaging fixes
2023-02-10 23:17:16 -05:00
nandahkrishna
8e5451df2f
style: use parentheses for assignment in conditions
2021-02-12 18:33:37 +05:30
Seeker
7a5a8baac5
patch: delete legacy code
...
SoftwareSpec#add_legacy_patches and Patch#normalize_legacy_patches
were added almost 6 years ago; let's delete them
See commit 665b14c4a44c272b46b8559836e9fdbeee5d8a46
```
$ grep -r 'normalize_legacy_patches' Library/Homebrew
./software_spec.rb: list = Patch.normalize_legacy_patches(list)
./patch.rb: def self.normalize_legacy_patches(list)
```
```
$ grep -r 'add_legacy_patches' Library/Homebrew
./software_spec.rb: def add_legacy_patches(list)
```
2021-01-13 18:40:46 -08:00
Mike McQuaid
d496f5c121
Deprecations for Homebrew 2.6.0
...
Do the usual deprecate/disable dance for the Homebrew 2.6.0 release.
Not to be merged until the next release will definitely be 2.6.0.
2020-11-24 16:44:02 +00:00
Markus Reiter
da9289eff0
Add more type signatures.
2020-11-13 12:26:36 +01:00
Markus Reiter
24ae318a3d
Move type annotations into files.
2020-10-10 14:59:39 +02:00
Mike McQuaid
2e5272d04c
Deprecate/disable code for Homebrew 2.5.0.
...
Do the usual "disable deprecations" and "uncomment pending deprecations"
dance and delete/deprecate/disable relevant/related code.
2020-09-03 10:34:22 +01:00
Markus Reiter
b9894e2241
Document Patch
.
2020-08-26 03:13:59 +02:00
Markus Reiter
36458b2356
Remove unnecessary check.
2020-07-30 03:21:12 +02:00
Markus Reiter
ca18a72673
Refactor output_unsupported_error
.
2020-07-30 03:21:12 +02:00
Mike McQuaid
4f75a77b08
Update deprecations
...
Add more deprecations, disable deprecations and remove disabled code.
2020-05-18 13:50:46 +01:00
Mike McQuaid
6ed1ccd8e8
Fetch (all) resources when building from source
...
Also:
- when `brew test` or `brew postinstall` is run allow `Resource#stage`
to fetch the resource.
- make `Formula#fetch` and `Resource#fetch` fetch external patches too.
Follow-up from #7549 and #7546 .
2020-05-12 12:37:54 +01:00
Mike McQuaid
1e265247ca
rubocop: apply autofixes.
2020-03-13 21:16:18 +00:00
Bo Anderson
43d6caf0e3
patch: add support for changing directory
2020-03-09 19:51:10 +00:00
Mike McQuaid
c4f72312ce
Fixup brew style
failures.
2019-04-30 09:19:18 +01:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files.
2019-04-20 13:27:36 +09:00
Mike McQuaid
86f43f79ee
Enable/fix optional Ruby frozen string literal usage
...
Combined with https://github.com/Homebrew/homebrew-test-bot/pull/247
this will test Homebrew's use of frozen strings in CI. After this we
will then enable it for Homebrew developers and eventually all Homebrew
users.
2019-04-19 10:30:41 +09:00
EricFromCanada
20167e5f1b
Adjust comments to tidy API docs output.
2018-10-18 21:42:43 -04:00
Markus Reiter
e9b9ea49a1
Update to RuboCop 0.59.1.
2018-09-17 03:45:59 +02:00
Markus Reiter
2452b27866
Refactor ErrorDuringExecution
.
2018-07-19 16:41:27 +02:00
Mike McQuaid
4ab0a18c8f
patch: improve nil strip message.
...
As reported https://github.com/Homebrew/brew/pull/4037#issuecomment-379591755 .
2018-04-08 16:48:50 -07:00
ilovezfs
7c07ec5fc1
resource: allow patches to be applied
2018-01-22 01:10:14 -08:00
Shaun Jackman
e32299e652
patch: Use patch found in the PATH
2017-11-19 13:54:46 -08:00
Markus Reiter
9bee9ca575
Use “squiggly” heredocs.
2017-10-18 14:39:09 +02:00
Markus Reiter
175ca909ee
Clean up code style and remove .rubocop_todo.yml
.
2017-10-08 16:10:37 +02:00
Mike McQuaid
021cef4b2b
Autocorrect Rubocop Style/SpecialGlobalVars.
2017-06-12 09:11:42 +01:00
Alyssa Ross
b01a9b0695
patch: clean up with Forwardable
2017-05-22 20:39:17 +01:00
Markus Reiter
58e36c7319
Fix Style/GuardClause.
2016-09-24 12:24:35 +02:00
Markus Reiter
52ff988530
Fix RuboCop CaseEquality.
2016-09-23 15:30:06 +02:00
Mike McQuaid
3982950e61
rubocop --auto-correct all hash-rocket usage.
2016-09-17 16:14:13 +01:00
Mike McQuaid
6693915399
rubocop --auto-correct all remaining files.
...
But remove some manual `.freeze`s on constants that shouldn't be
constants.
2016-09-17 16:14:13 +01:00
Misty De Meo
1ed7108052
Array#count alias didn't always exist
...
Fixes mistydemeo/tigerbrew#408 .
2016-02-06 14:20:56 -08:00
ilovezfs
cc3d041c26
DSL method "apply" to specify patch files
...
The "apply" DSL method can be called from patch-do blocks to specify
the paths within an archive of the desired patch files, which will be
applied in the order in which they were supplied to the "apply" calls.
If "apply" isn't used, raise an error whenever the extracted directory
doesn't contain exactly one file.
The "apply" method can be called zero or more times within a patch-do
block with the following syntaxes supported:
apply "single_apply"
apply "multiple_apply_1", "multiple_apply_2"
apply [array_of_apply]
If apply must be used, a single call using the second syntax above is
usually best practice. Each apply leaf should be the relative path to a
specific patch file in the extracted directory.
For example, if extracting this-v123-patches.tar.gz gives you
this-123
this-123/.DS_Store
this-123/LICENSE.txt
this-123/patches
this-123/patches/A.diff
this-123/patches/B.diff
this-123/patches/C.diff
this-123/README.txt
and you want to apply only B.diff and C.diff, then you need to use
"patches/B.diff" and "patches/C.diff" for the lowest-level apply leaves.
The code was provided by Xu Cheng. Any mistakes are mine.
2016-02-01 18:37:36 +00:00
BrewTestBot
13d544e11e
Core files style updates.
...
Closes Homebrew/homebrew#42354 .
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03 13:22:35 +01:00
Jack Nagel
0f01e9ff43
Remove the direct url writer from Resource
2015-01-08 14:18:41 -05:00
Jack Nagel
d2d7516cc0
Allow debugging patching failures
...
Closes Homebrew/homebrew#33056 .
2014-12-26 19:42:11 -05:00
Jack Nagel
5575fb843c
Don't raise NotImplementedError
2014-12-23 01:04:44 -05:00
Jack Nagel
56dd575f96
Pass command and arg list into ErrorDuringExecution constructor
2014-09-18 20:32:50 -05:00
Jack Nagel
a55e196f5f
Simplify internal representation of patches
...
- remove support for IO objects, since we no longer access ::DATA
directly
- since we don't need to support IO objects, use a separate class for
string patches and stop wrapping strings in StringIO ojects
2014-07-29 16:22:06 -05:00
Jack Nagel
3f12ddbccd
Decouple DATA patches from the executing script
2014-07-29 16:22:06 -05:00
Jack Nagel
8df8f437f0
Make Patch a module since it only has singleton methods
2014-07-28 16:23:42 -05:00
Jack Nagel
90f69372ce
Remove inheritance patch classes
2014-07-28 16:23:42 -05:00
Jack Nagel
126d2133ab
Fix method signature
2014-07-10 12:42:54 -05:00
Jack Nagel
2b9cfe9fa5
Legacy patches are never StringIOs
2014-07-10 12:42:54 -05:00
Jack Nagel
fbefa76ce2
Always use class.name to build inspect strings
2014-07-01 18:39:15 -05:00
Jack Nagel
e0c1f5aef6
Remove redundant method
...
This already happens in the superclass.
2014-03-18 14:46:43 -05:00
Jack Nagel
7af46a5ed0
Always use CurlDownloadStrategy for legacy patches
...
Fixes Homebrew/homebrew#27671 .
2014-03-18 14:24:32 -05:00
Jack Nagel
c84c8b1d0e
Set patch name on initialization
2014-03-15 22:40:14 -05:00
Jack Nagel
251bd707a2
Remove use of Forwardable from ExternalPatch
2014-03-14 16:16:53 -05:00