234 Commits

Author SHA1 Message Date
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
Bo Anderson
d3a20bf030 test/utils/repology_spec: mark as :needs_network
Also silence stdout from `parse_api_response`.
2020-08-22 01:52:02 +01:00
Rylan Polster
6eb07d70f0 formula: convert license array to hash 2020-08-20 10:26:37 -04:00
Rylan Polster
1a321dab62 keep license array support 2020-08-19 12:48:50 -04:00
Rylan Polster
90d9454d1e utils/spdx: add support for complex expressions
Co-authored-by: Seeker <meaningseeking@protonmail.com>
2020-08-19 12:47:58 -04:00
Elizabeth Tackett
9904c862a1 do not paginate repology API more than required by limit 2020-08-19 09:10:57 -05:00
Elizabeth Tackett
ed23eb1fab update repology for changes to GitHub module 2020-08-13 09:56:41 -05:00
Baffour Adu Boampong
6c266a6964
Merge branch 'master' into mlh-outdated-packages 2020-08-13 13:18:08 +00:00
Baffour Adu Boampong
62125c2214 Refactor how test formulas are installed in tests 2020-08-12 14:24:35 +00:00
Baffour Adu Boampong
8acc72773a Refactor how test formulas are installed in tests 2020-08-12 14:24:21 +00:00
Bo Anderson
d7864d7efb download_strategy: more direct SVN modified date detection 2020-08-11 21:01:53 +01:00
Baffour Adu Boampong
eea32b955b brew style fixes 2020-08-11 13:18:22 +00:00
Baffour Adu Boampong
b508cc6785 remove commments 2020-08-11 13:12:54 +00:00
Baffour Adu Boampong
9b3110362e Merge branch 'mlh-outdated-packages' of github.com:MLH-Fellowship/brew into mlh-outdated-packages 2020-08-10 21:38:17 +00:00
Baffour Adu Boampong
2349c1fc10 brew style fixes 2020-08-10 21:38:01 +00:00
Baffour Adu Boampong
ad2809b615
Merge branch 'master' into mlh-outdated-packages 2020-08-10 21:21:09 +00:00
Baffour Adu Boampong
183d76d59e Add tests for livecheck_formula utils 2020-08-10 21:15:04 +00:00
Seeker
6ecef73131 test: add spdx spec 2020-08-06 11:14:24 -07:00
Elizabeth Tackett
db27f446d0 WIP repology module tests 2020-08-03 11:27:35 -05:00
Issy Long
e1383c2898
utils/git_spec: Make example files easier to reason about
- Give the files real names, like `README.md`, rather than having to
  parse the difference between "bleh" and "blah" when reading the tests.
2020-07-14 00:18:45 +01:00
Issy Long
981726c088
utils/git_spec: Add a test for last_revision_commit_of_files
- This method, called from `brew extract` in the case of extraction from
  third-party taps, was untested. This led to it breaking when we refactored
  some of it to appease Sorbet (see PR 7933). If I make the same
  (flawed) change here and run these tests, they fail.
- There's a fair bit going on here, but most of it is setup for
  committing changes to more files, as we're testing operations on
  multiple files in a Homebrew repo.
- I originally tried to write tests for `brew extract`, but that
  required _a lot_ of refactoring because those tests (and their helper
  methods) aren't designed for third-party taps - they rely on
  `CoreTap`. So testing the underlying method is a better solution.
2020-07-14 00:18:44 +01:00
Jonathan Chang
c6e9cff125 dev-cmd: add brew-sponsors.rb 2020-07-05 15:45:36 +10:00
Jonathan Chang
90309e5f42 github: fetch approved reviews for a pull request 2020-06-29 12:53:03 +10:00
Mike McQuaid
58cc7dd96c
utils/svn_spec: use shim to detect Subversion presence. 2020-06-24 10:37:36 +01:00
Mike McQuaid
b58fa4ebb1
Drop Mavericks support.
Companion to https://github.com/Homebrew/brew/pull/7698.

Provide better, `odeprecated` messaging for
`depends_on :macos => :mavericks` and otherwise just fix up the code
that relied on `:mavericks`.
2020-06-10 10:06:46 +01:00
Mike McQuaid
ef95b59ed4
Remove HomebrewArgvExtension
Fixes #5730
2020-05-23 19:39:11 +01:00
Shaun Jackman
133ee7966d shell: Use .profile unless .bash_profile exists 2020-05-13 09:30:02 -07:00
Jonathan Chang
7d63f0b506 github: improve tests 2020-04-14 13:41:35 +10:00
Mike McQuaid
3381cbf5c7
Use Homebrew::EnvConfig. 2020-04-07 09:58:26 +01:00
Jonathan Chang
0d3a4d98c0 utils/github: add test for fetch_artifact 2020-03-30 22:41:17 +11:00
Vítor Galvão
2e8aa3eb97 Use long --disable instead of short -q in curl 2020-03-29 20:04:37 +01:00
Markus Reiter
50b61fa7f2 Retry curl requests 3 times by default. 2020-03-20 18:40:43 +01:00