3547 Commits

Author SHA1 Message Date
Mike McQuaid
30e177f563
Merge pull request #8254 from nandahkrishna/migrate-livecheck-module
livecheck migration: create Homebrew::Livecheck
2020-08-31 08:09:58 +01: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
Rylan Polster
b1c374b729 style: fix deprecation date check 2020-08-29 10:57:07 -04:00
Nanda H Krishna
3cab6042d8
livecheck: update URL in test
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com>
2020-08-29 03:23:10 +05:30
nandahkrishna
062156365b
livecheck: modified test 2020-08-29 02:18:18 +05:30
nandahkrishna
2550af57df
livecheck: changes made and improved test 2020-08-29 00:32:34 +05:30
Seeker
4377a08b6e version: allow implicitly converting tokens to strings 2020-08-28 10:25:52 -07:00
nandahkrishna
4e0cc48b65
livecheck: changes made and tests added 2020-08-27 22:46:06 +05:30
nandahkrishna
c9f0642d45
livecheck migration: create Homebrew::Livecheck
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com>
Co-authored-by: Thierry Moisan <thierry.moisan@gmail.com>
Co-authored-by: Dawid Dziurla <dawidd0811@gmail.com>
Co-authored-by: Maxim Belkin <maxim.belkin@gmail.com>
Co-authored-by: Issy Long <me@issyl0.co.uk>
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
Co-authored-by: Seeker <meaningseeking@protonmail.com>
2020-08-27 21:26:58 +05:30
Mike McQuaid
ff8d30df74
Merge pull request #8255 from nandahkrishna/migrate-livecheck-strategy
livecheck migration: add strategies
2020-08-27 16:12:38 +01:00
nandahkrishna
f520301180
livecheck migration: add strategies
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com>
Co-authored-by: Thierry Moisan <thierry.moisan@gmail.com>
Co-authored-by: Dawid Dziurla <dawidd0811@gmail.com>
Co-authored-by: Maxim Belkin <maxim.belkin@gmail.com>
Co-authored-by: Issy Long <me@issyl0.co.uk>
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
Co-authored-by: Seeker <meaningseeking@protonmail.com>
2020-08-27 20:00:30 +05:30
vidusheeamoli
2468fb127d dev-cmd: add brew typecheck cmd
This PR adds a new `brew typecheck` developer command which checks for
typechecking errors in the current code with Sorbet.
2020-08-27 02:41:36 +05:30
Markus Reiter
c53f362476 Refactor and document Version. 2020-08-26 03:17:39 +02:00
Mike McQuaid
31f3afa36d
Merge pull request #8480 from MikeMcQuaid/tests-timeout
spec_helper: increase tests timeout.
2020-08-25 11:08:17 +01:00
Mike McQuaid
2bdf0d6068
spec_helper: increase tests timeout.
When GitHub Actions is congested some tests can take longer than this
(particularly as we're running in parallel). Globally double the time
we allow for all tests.
2020-08-25 10:20:17 +01:00
Mike McQuaid
dbe427073d
Merge pull request #8399 from MLH-Fellowship/migrate-to-args-named
args: Migrate usage of args loading methods to args.named
2020-08-25 10:07:27 +01:00
Markus Reiter
75962590db
Merge pull request #8466 from reitermarkus/bundle-spec
Remove unused metadata from `bundle` spec.
2020-08-24 19:35:59 +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
21c502e05f Remove unused metadata from bundle spec. 2020-08-24 08:31:07 +02:00
Markus Reiter
4465a1f6fb
Merge pull request #8455 from reitermarkus/document-svn
Refactor and document `Svn`.
2020-08-24 00:03:21 +02:00
William Ma
fa7bd3bff6 args: Migrate usage of args loading methods to args.named 2020-08-23 09:02:20 -04: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
Markus Reiter
caa73877c0 Refactor and document Inreplace. 2020-08-23 04:48:19 +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
Mike McQuaid
5d05a059e3
Merge pull request #8400 from Bo98/pc-version-tests
test/os/mac: add tests to validate pkg-config library versions
2020-08-21 17:12:06 +01:00
Mike McQuaid
667c2b8804
Merge pull request #8382 from Bo98/startup-speedup
Lazily require some heavy files
2020-08-21 17:11:39 +01:00
Mike McQuaid
79695b0ee5
Merge pull request #8411 from Rylan12/license-rubocop
License style cleanup
2020-08-21 11:52:54 +01:00
Dawid Dziurla
ebafc70bcb
Merge pull request #8407 from dawidd6/ruby-w0
Consistently use HOMEBREW_RUBY_WARNINGS when calling ruby
2020-08-20 21:38:08 +02:00
Markus Reiter
15279d78b7
Merge pull request #8370 from miccal/cask_symlinked
cask/artifact/symlinked: do not overwrite files or symbolic links
2020-08-20 21:03:19 +02:00
Dawid Dziurla
ded2927751
Merge pull request #8383 from dawidd6/svn-catalina
extend/os/mac: install svn on catalina and newer
2020-08-20 18:42:34 +02:00
Rylan Polster
97b1b75dc5 style: forbid one line nested license expressions 2020-08-20 11:20:04 -04:00
Rylan Polster
ef447a38c6 style: convert from license array to license hash 2020-08-20 10:58:36 -04:00
Bo Anderson
86eca5ab44 test/os/mac: add tests to validate library versions 2020-08-20 15:57:39 +01:00
Rylan Polster
6eb07d70f0 formula: convert license array to hash 2020-08-20 10:26:37 -04:00
Dawid Dziurla
c8c2e38bcb
Consistently use HOMEBREW_RUBY_WARNINGS when calling ruby
Adding this in `dev-cmd/ruby.rb` allows us to suppress warnings like:
```
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/language/python.rb:8: warning: Insecure world writable dir /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/scm in PATH, mode 040777
```
2020-08-20 14:59:58 +02:00
Bo Anderson
281632b64e test: ensure require "formula" isn't run on startup 2020-08-20 02:05:17 +01:00
Bo Anderson
e3372e2a14 Lazily require some heavy files 2020-08-20 02:05:17 +01:00
Seeker
3379e3b5cf os: add kernel_version 2020-08-19 11:41:30 -07:00
Rylan Polster
1a321dab62 keep license array support 2020-08-19 12:48:50 -04:00
Rylan Polster
e215b3df75 dev-cmd/audit: update license checks to new style 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
Mike McQuaid
f6e035ec98
Merge pull request #8297 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-0.89.1
build(deps): bump rubocop from 0.88.0 to 0.89.1 in /Library/Homebrew
2020-08-19 17:40:32 +01:00
Mike McQuaid
3a91c37e66
Fix RuboCop checks. 2020-08-19 17:12:32 +01:00
Elizabeth Tackett
d6f2a1c6fa Merge branch 'master' into mlh-outdated-packages 2020-08-19 09:39:26 -05:00
Elizabeth Tackett
9904c862a1 do not paginate repology API more than required by limit 2020-08-19 09:10:57 -05:00