412 Commits

Author SHA1 Message Date
Issy Long
245c61017f
Auto-fix Layout/ElseAlignment offenses 2019-10-13 16:04:28 +01:00
Issy Long
341ea60807
Auto-fix Style/RedundantBegin offenses
- This also required auto-fixes for Layout/EmptyLinesAroundBlockBody and
  Layout/InconsistentIndentation once the auto-fixer had got rid of the
  "redundant begin"s.
2019-10-13 16:04:27 +01:00
Mike McQuaid
e9aba2efb6
Require and provide portable Ruby 2.6.3. 2019-10-10 15:53:16 +01:00
Mike McQuaid
36bc11b01a
utils/shell: match preferred shell by symbol. 2019-10-08 12:10:31 +01:00
David O'Trakoun
5ca4b43383
Update Library/Homebrew/utils/shell.rb
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
2019-10-07 10:25:41 -04:00
David O'Trakoun
960b8b659c
Support for zsh ZDOTDIR, FIX #6533
- Add test spec with ZDOTDIR set and unset
2019-10-06 12:40:18 -04:00
Markus Reiter
a49282c318 Simplify return value logic. 2019-10-04 23:39:26 +02:00
Markus Reiter
9df563f25f Add Tty::color?. 2019-10-04 23:39:25 +02:00
Markus Reiter
b1d0c61fea Update Gems. 2019-10-03 09:22:44 +02:00
Markus Reiter
0a1985d46a Disable curl globbing. 2019-10-01 08:38:44 +02:00
Markus Reiter
70822d2bdb Add workaround for curl: (56) Unexpected EOF. 2019-09-26 05:17:51 +02:00
Mike McQuaid
fbc13f05dd
utils/curl: extract status checks into method. 2019-09-18 10:32:13 +01:00
Caleb Xu
78a0105fe2 utils/curl.rb: accept 1xx HTTP status codes
RFC 2616 states:

A client MUST be prepared to accept one or more 1xx status responses
prior to a regular response, even if the client does not expect a 100
(Continue) status message. Unexpected 1xx status responses MAY be
ignored by a user agent.

In the rare cases that we encounter a formula URL with a server that
provides a preliminary 1xx status code, it seems that (at least during
audit) we are failing on encountering this status code, even though
retrieving the file will succeed without issues.
2019-09-17 11:01:03 -04:00
Markus Reiter
31f15acc01 Add GitHub::check_runs. 2019-09-13 22:30:25 +02:00
Markus Reiter
f010aa48ff Skip AppleScript actions if Automation Access isn't granted. 2019-09-13 16:35:44 +02:00
Cheng XU
4f29af08f8
github: redact token in the log 2019-07-18 15:10:15 +08:00
Cheng XU
739c06229d
curl/curl_output: allow redacting secrets in the log
Add a new argument `secrets` to specify secret tokens, so we can redact them in the log.
2019-07-18 15:10:15 +08:00
Maik Riechert
e113fd70be add HOMEBREW_CURL_RETRIES 2019-05-18 13:23:08 +01:00
Mike McQuaid
2e817d2644
utils/github: better handle blank scopes.
If both provided and required scopes are blank then we cannot display a
good error message so don't try.

Fixes #6134.
2019-05-15 09:18:05 +01:00
Frantisek Holop
6e691320f8 teach brew about mksh 2019-05-12 20:45:09 +02:00
Mike McQuaid
c4f72312ce
Fixup brew style failures. 2019-04-30 09:19:18 +01:00
kiendang
5c83729be9 Fix mutable string syntax 2019-04-26 23:03:40 +08:00
Mike McQuaid
261e2e7926
utils/github: fix frozen string usage.
See https://discourse.brew.sh/t/error-cant-modify-frozen-string/4691/4
2019-04-25 23:28:50 -07:00
Mike McQuaid
fc6bd2ea1c
Fixup more frozen string handling. 2019-04-20 14:07:29 +09: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
Mike McQuaid
9e7b98d3e2
Don't check system Ruby is new enough when unnecessary.
We know this is the case in macOS >=10.13.3 so save a Ruby process call.
2019-04-18 21:42:28 +09:00
Mike McQuaid
ef2e297d3b
Disable RubyGems by default.
This speeds up all Ruby invocations where we don't need RubyGems by
around 10%. Where we do need RubyGems: include it manually.
2019-04-18 17:45:03 +09:00
EricFromCanada
89f0fcedbe whitespace fixes 2019-04-13 21:32:04 -04:00
EricFromCanada
fa6404e0f5 grammar fixes 2019-04-13 21:29:32 -04:00
kiendang
028b8b408d Remove use of bash 2019-03-20 20:19:33 +08:00
kiendang
00f74902d4 Call git log through bash for globstar support 2019-03-18 03:05:30 +08:00
kiendang
6be6bba0be brew extract from all taps 2019-03-17 23:44:35 +08:00
Mike McQuaid
ae0332a0f6
Merge pull request #5867 from MikeMcQuaid/linuxbrew-docs-cleanup
Update Linuxbrew references to Homebrew on Linux
2019-03-12 20:39:56 +00:00
Mike McQuaid
710859e300
Update Linuxbrew references to Homebrew on Linux
This is a clearer branding for us to use.

Also, as part of testing this, make some fixes to Jekyll in the docs folder.

Fixes #5835
2019-03-12 20:13:38 +00:00
EricFromCanada
560ccddb69 help: rewrap output to 80 columns
Accounts for paragraph breaks and option descriptions. Also fixes some help text nits.
2019-03-11 12:52:07 -04:00
Steven Peters
e91b889e04 utils/github: use tap.full_name 2019-03-03 22:58:31 -08:00
Mike McQuaid
128300a754
utils/gems: install Bundler 2.
Our Gemfile requires it and it will result in a more consistent configuration.
2019-02-28 12:29:52 +00:00
Mike McQuaid
17f3ee1957
Improve Bundler cleanup
Rather than trying to be smart and doing this ourselves in `brew cleanup` let’s just installed Bundler somewhere it doesn’t try to clean itself up and use `bundle install --cleanup` when we need cleanup done.

Also, use `ohai` and `odie` when possible as they look nicer.
2019-02-27 14:02:46 +00:00
okhowang(王沛文)
d959a780d4 use python flock firstly 2019-02-26 14:19:12 +08:00
Mike McQuaid
d33c225e47
utils/ruby: don't remove cleanup bundler.
We're sharing this directory now.
2019-02-22 15:59:14 +00:00
Mike McQuaid
3a2259c271
utils/gems: silence bundle check output. 2019-02-21 16:34:20 +00:00
Mike McQuaid
6b326f4465
Move all gems to vendor/bundle, remove vendor/bundle-standlone. 2019-02-21 16:34:20 +00:00
Mike McQuaid
4f76d12874
utils/gems: extract from utils.
Also, don’t use any non-standard Ruby functionality to avoid needing any `requires.
2019-02-21 12:56:22 +00:00
Mike McQuaid
e095da4d01
rubocop: enable Layout/EmptyLineAfterGuardClause. 2019-02-21 12:55:49 +00:00
Mike McQuaid
d64429a736
rubocop: enable Style/IfUnlessModifier. 2019-02-21 12:55:49 +00:00
Markus Reiter
a4e0413bf9 Let GitHub::open_api return nil when status is 204 No Content. 2019-02-20 02:11:19 +01:00
Markus Reiter
e9c45ff17b Pass additional options to GitHub.pull_requests. 2019-02-16 11:30:49 +01:00
Markus Reiter
68e0c5f904 Check for write access instead of HOMEBREW_DEVELOPER. 2019-02-15 16:27:37 +01:00
Markus Reiter
57fefff942 Add brew cask automerge command. 2019-02-15 16:27:37 +01:00