Seeker
9bf409111c
git_repository: raise error instead of returning nil if safe
2021-01-17 09:01:04 -08:00
Seeker
4f02c1c8a8
utils/git_repository: use Pathname.pwd
if no repo
specified
2021-01-13 13:02:37 -08:00
Misty De Meo
847897fdac
Popen spec: ensure Rubocop is happy
...
These were introduced in #10305 but only started going red
after that PR was merged.
2021-01-13 11:21:10 -08:00
Seeker
be6dd72c16
Merge pull request #10305 from SeekingMeaning/safe-popen-tests
...
utils/popen: add `safe` argument to `popen_read` and `popen_write`
2021-01-13 10:51:46 -08:00
Seeker
82901036f9
Merge pull request #10298 from SeekingMeaning/ast
...
utils/ast: move helper functions from `FormulaAST` to `AST`
2021-01-12 22:32:23 -08:00
Seeker
99a7e2192c
Merge pull request #10296 from SeekingMeaning/utils-named-subject
...
test/utils/*: use `described_class` or named `subject`
2021-01-12 13:38:55 -08:00
Seeker
40d85ecb40
popen_spec: add tests for safe_popen_read
and safe_popen_write
2021-01-12 09:56:05 -08:00
Seeker
14b4916dda
utils/ast: move helper functions from FormulaAST
to AST
2021-01-11 20:35:14 -08:00
Seeker
022bcbb269
test/utils/*: use described_class
or named subject
2021-01-11 12:31:39 -08:00
Seeker
2ebfb4221c
utils/ast: add FormulaAST
class
2021-01-10 09:25:46 -08:00
Mike McQuaid
57eaae6146
Merge pull request #10248 from MikeMcQuaid/analytics-tweaks
...
Improve submitted analytics data
2021-01-08 10:01:19 +00:00
Seeker
41e0619de8
utils: add git_repository
2021-01-07 11:45:11 -08:00
Mike McQuaid
8af4895479
Improve submitted analytics data
...
- Use default `custom-prefix` label on macOS ARM (as `/usr/local` is
not the default).
- Add architecture (or Rosetta) to analytics event label.
- Don't send minor versions on Big Sur.
- Remove defunct `HOMEBREW_OSX_VERSION` reference.
2021-01-07 09:28:40 +00:00
Seeker
8828b4bd68
utils/ast: add stanza_text
helper function
2021-01-03 22:26:19 -08:00
Seeker
24636d8bea
utils/ast: cleanup
...
- move `add_bottle_stanza!` from `Utils::Bottles` to `Utils::AST`
- add `replace_bottle_stanza!`
- simplify parameters
2020-12-29 03:40:39 -08:00
Seeker
aaf7bc2bc5
utils: add AST helper functions for editing formulae
2020-12-22 22:05:23 -08:00
Seeker
cdb07d89ae
integration_test: fix indentation for test formulae
2020-12-21 16:17:39 -08:00
Sam Ford
27b7713f1e
Expand tests for Curl#curl_args
2020-12-19 18:13:15 -05:00
Seeker
b8aa67be5b
bottle: add bottle stanza by traversing AST
2020-12-10 13:38:57 -08:00
Jonathan Chang
8b206dfa33
git_extensions: move commit_message from utils/git
2020-12-06 14:33:23 +11:00
Rylan Polster
22a3025f6e
utils/pypi: return nil for non-pypi-packages from url
2020-12-03 15:00:30 -05:00
Rylan Polster
4bfb390577
utils/pypi: make package name comparison case-insensitive
2020-12-01 01:19:33 +01:00
Rylan Polster
b2e25d12aa
utils/pypi: refactor package handling
2020-11-24 15:40:15 -05:00
Michka Popoff
1fc3d22ab4
pr-pull: allow to pull from multiple workflows
...
and allow to skip missing workflows
Can be used like this:
brew pr-pull --workflows=tests.yml,wheezy_tests.yml --ignore-missing-artifacts=wheezy_tests.yml PRNUMBER
2020-11-24 15:46:44 +01:00
Markus Reiter
f87c9c5dc4
Fix tests failing locally.
2020-11-18 05:54:42 +01:00
Rylan Polster
dda0dc72a7
format note comments
2020-11-16 02:02:52 +01:00
Francois-Xavier Coudert
6b0e26102a
Fix test for ARM
2020-11-06 14:50:43 +01:00
Rylan Polster
24523f8225
utils/spdx: allow other license symbols
2020-10-22 10:01:40 -04:00
Jonathan Chang
4a5f1a8477
utils/github: paginate pull request commits API
2020-10-21 00:17:02 +11:00
Markus Reiter
e509b1317e
Fix svn_spec
.
2020-10-10 19:10:58 +02:00
Markus Reiter
318091cccc
Move StringInreplaceExtension
into separate file.
2020-10-10 15:06:19 +02:00
Markus Reiter
24ae318a3d
Move type annotations into files.
2020-10-10 14:59:39 +02:00
Jonathan Chang
cdfb1badcf
utils/git: helper function to get commit msg
2020-09-20 13:23:01 +10:00
Jonathan Chang
146664b45f
utils/git: cherry-pick test
2020-09-20 13:21:27 +10:00
Jonathan Chang
d09ebf428f
utils/git: new file_at_commit function
2020-09-20 13:21:27 +10:00
Jonathan Chang
415c36041a
dev-cmd/pr-pull: use GitHub API to get PR commits
2020-09-20 13:21:27 +10:00
Jonathan Chang
3a8bd8514f
utils/git: add cherry-pick function
2020-09-17 17:27:38 +10:00
Mike McQuaid
5a20968c19
Tweak tests annotations
...
- Don't skip Git installation tests on generic OS; remove it instead.
- Install Subversion for macOS Subversion tests.
2020-09-11 11:11:42 +01:00
Seeker
15af7189eb
utils: add tar
...
Includes `validate_file` method to be used by `bump-formula-pr`
2020-09-08 07:08:07 -07:00
Mike McQuaid
8604cdb15a
Merge pull request #8541 from claui/fix-patch-stdout
...
Return standard output in `popen_write`
2020-09-02 17:48:12 +01:00
Markus Reiter
4d1fa19a18
Add test for GitHub::Actions::Annotation
.
2020-09-02 16:44:16 +02:00
Claudia
772032f18a
Add failing tests for popen_write
...
When using `popen_write`, the expectation is to return the
standard output of the child process.
This expectation is evident in how `safe_popen_write` is written:
```
def self.safe_popen_write(*args, **options, &block)
output = popen_write(*args, **options, &block)
return output if $CHILD_STATUS.success?
raise ErrorDuringExecution.new(args, status: $CHILD_STATUS, output: [[:stdout, output]])
end
```
However, no code has been written to actually *obtain* that output
from the child process. The side effects of that are described in
issue #8244 . [1]
[1]: https://github.com/Homebrew/brew/issues/8244
The newly-added tests reveal that `popen_write` only returns the
number 4 instead of the expected standard output.
For example, given a file `foo` with the content `Foo\n`, one test
calls `popen_write` with `cat foo -` and an input of `Bar`.
The expected output would be `Foo\nBar\n` but the actual output is
the number 4 (which is what Ruby’s `IO#write` method returns).
2020-08-30 22:29:46 +02:00
Markus Reiter
0129247391
Refuse to install Git if HOMEBREW_TEST_GENERIC_OS
is set.
2020-08-29 21:45:51 +02:00
Markus Reiter
bb1be7ef9d
Call clear_available_cache
before and after Git
specs.
2020-08-29 21:42:24 +02:00
Mike McQuaid
4bc2f9d705
Merge pull request #8438 from Bo98/repology-needs_network
...
test/utils/repology_spec: mark as `:needs_network`
2020-08-24 09:26:13 +01:00
Mike McQuaid
a1c5428c50
Merge pull request #8439 from Bo98/spdx_spec-noerr
...
test/utils/spdx_spec: don't error if test is skipped
2020-08-24 09:18:09 +01:00
Markus Reiter
4465a1f6fb
Merge pull request #8455 from reitermarkus/document-svn
...
Refactor and document `Svn`.
2020-08-24 00:03:21 +02:00
Markus Reiter
3118fedab9
Refactor and document Git
.
2020-08-23 06:40:07 +02:00
Markus Reiter
8b26e380a2
Refactor and document Svn
.
2020-08-23 06:33:58 +02:00
Bo Anderson
f54b3e7a17
test/utils/spdx_spec: don't error if test is skipped
2020-08-22 01:58:26 +01:00