910 Commits

Author SHA1 Message Date
Elizabeth Tackett
56cf5bafdb focus util module on repology API call 2020-06-29 09:51:58 -05:00
Elizabeth Tackett
2f419f5c55 remove unnecessary explicit return val 2020-06-29 09:33:24 -05:00
Elizabeth Tackett
9382b1273a update display text 2020-06-29 09:27:42 -05:00
Elizabeth Tackett
d4bbffdce8 place api_parser code into util module 2020-06-29 09:26:27 -05:00
Elizabeth Tackett
198429ab25 rename repology.rb to update.rb 2020-06-29 09:21:06 -05:00
Elizabeth Tackett
0cb06acf5b add repology util file 2020-06-29 09:18:36 -05:00
Jonathan Chang
9cab9b7f39
pr-pull: handle empty string cases
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-06-29 18:55:47 +10:00
Mike McQuaid
61b4e7c414
Merge pull request #7745 from dtrodrigues/bump-pr-dupes
bump-formula-pr: search for closed dupe PRs
2020-06-29 08:39:30 +01:00
Jonathan Chang
90309e5f42 github: fetch approved reviews for a pull request 2020-06-29 12:53:03 +10:00
Dustin Rodrigues
f684a59fa5 bump-formula-pr: search for closed dupe PRs 2020-06-27 12:50:43 -04:00
Lionell
57fd1fdc7e Merge branch 'master' into license 2020-06-25 13:42:27 +08:00
Mike McQuaid
07ea18e2d2
ruby.sh: don't print recoverable error.
This prints "error" even when we can install a portable ruby.
2020-06-23 13:13:31 +01:00
Lionell Loh Jian An
eca528cccc
util github: remove nil as that is already expected behaviour
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-06-19 03:38:36 +08:00
Lionell
610dfe0fc2 audit: fixed with PR comments. Refactored get_repo_license api call and audit_license only new_formula 2020-06-18 00:44:33 +08:00
Mike McQuaid
854e96c7c5
Merge pull request #7686 from maxim-belkin/test_ruby_update
utils/ruby.sh: update `test-ruby` (and rename to test_ruby)
2020-06-12 09:13:15 +01:00
Bo Anderson
87931e1c03 utils/ruby.sh: set TERMINFO_DIRS to bundled terminfo 2020-06-10 14:36:18 +01:00
Maxim Belkin
23d24dfed7
utils/ruby.sh: rely on test_ruby's exit code
Instead of printing "true" or "false", test_ruby now returns 1 when
tested Ruby is not usable and 0 if it is.
2020-06-10 07:56:37 -05:00
Maxim Belkin
9751d3bb8c
Fix calls to 'test_ruby' in conditional statements
Co-authored-by: Shaun Jackman <sjackman@gmail.com>
2020-06-06 12:03:51 -05:00
rmnull
a7405601f3
Use Gem to install gems instead of invoking system 2020-06-04 11:36:58 +05:30
Maxim Belkin
58f3e49c0b
utils/ruby.sh: rename test-ruby to test_ruby. Cosmetic changes 2020-06-03 18:01:38 -05:00
Mike McQuaid
b615de1bc3
utils/gems: always ensure default Gems are in GEM_PATH.
Fixes #7608.
2020-06-03 10:02:46 +01:00
Mike McQuaid
aa81982aba
brew style --fix 2020-06-02 09:49:23 +01:00
Sean Molenaar
a99d428f6d
Only search pull requests for artifacts 2020-05-28 15:14:32 +02:00
Mike McQuaid
0b6ae538d1
Merge pull request #7545 from maxim-belkin/keep_ruby_path_set
utils/ruby.sh: search PATH for Ruby on Linux. update.sh: keep HOMEBREW_RUBY_PATH set.
2020-05-27 15:19:12 +01:00
Sean Molenaar
3567892802
Add notibility checks for casks 2020-05-26 14:21:25 +02:00
Mike McQuaid
ef95b59ed4
Remove HomebrewArgvExtension
Fixes #5730
2020-05-23 19:39:11 +01:00
Mike McQuaid
e1f3c8d2b3
Merge pull request #7579 from MikeMcQuaid/deprecations
Update deprecations
2020-05-23 14:38:10 +01:00
Maxim Belkin
5d3456f485
utils/ruby.sh: make code more readable
1. Repurpose 'vendor_ruby_current_version' variable:
   now this is not a pointer to a file but actual version number
2. Introduce 'vendor_ruby_latest_version' variable:
   it holds the value of the latest version of portable Ruby
2020-05-21 17:15:14 -05:00
Maxim Belkin
db561eb7b9
utils/ruby.sh: setup-ruby: handle 'vendor-install' cmd early
Exit from the 'setup-ruby' function when user issued
`vendor-install` command.
We do so instead of wrapping everything in

```sh
if [[ "$HOMEBREW_COMMAND" != "vendor-install" ]]
```

`git diff` when whitespaces are ignored:

$ git diff -w
diff --git a/Library/Homebrew/utils/ruby.sh b/Library/Homebrew/utils/ruby.sh
index 7974e909c..4be204309 100644
--- a/Library/Homebrew/utils/ruby.sh
+++ b/Library/Homebrew/utils/ruby.sh
@@ -27,8 +27,11 @@ If there's no Homebrew Portable Ruby available for your processor:

   unset HOMEBREW_RUBY_PATH

-  if [[ "$HOMEBREW_COMMAND" != "vendor-install" ]]
+  if [[ "$HOMEBREW_COMMAND" == "vendor-install" ]]
   then
+    return 0
+  fi
+
   if [[ -x "$vendor_ruby_path" ]]
   then
     HOMEBREW_RUBY_PATH="$vendor_ruby_path"
@@ -85,7 +88,6 @@ If there's no Homebrew Portable Ruby available for your processor:
       HOMEBREW_RUBY_PATH="$vendor_ruby_path"
     fi
   fi
-  fi

   export HOMEBREW_RUBY_PATH
 }
2020-05-21 15:06:21 -05:00
Maxim Belkin
8dcb1636ce
utils/ruby.sh: add explanatory comments 2020-05-20 12:29:45 -05:00
Mike McQuaid
1ebb1c2885
Merge pull request #7580 from tharun208/brew-cask-analytics
Added analytics for cask info
2020-05-20 08:06:46 +01:00
Maxim Belkin
dcc486fa9e
utils/ruby.sh: find usable Ruby from PATH only 2020-05-19 12:24:00 -05:00
Tharun
7186600a5c renamed get_formulae_api 2020-05-19 14:59:43 +05:30
Mike McQuaid
4f75a77b08
Update deprecations
Add more deprecations, disable deprecations and remove disabled code.
2020-05-18 13:50:46 +01:00
Mike McQuaid
b9f493a7f6
Pass FormulaInstaller#display_options to BuildError.
This should improve the output in analytics.
2020-05-18 12:46:25 +01:00
Mike McQuaid
f5b6a90fd0
utils/analytics: fix options reporting.
Check we have a non-empty `options` and convert them all to human
readable strings.
2020-05-18 08:50:51 +01:00
Maxim Belkin
b4267d80e4
utils/ruby.sh: avoid nested ifs 2020-05-17 16:32:06 -05:00
Tharun
2a62be0875 Refractored analytics to support analytics for cask 2020-05-17 01:38:11 +05:30
Tharun
139ca1d374 Updated analytics method name for cask info 2020-05-17 00:31:12 +05:30
Maxim Belkin
083f56fafe
utils/ruby.sh: quote HOMEBREW_RUBY_PATH when calling test-ruby 2020-05-15 16:35:42 -05:00
Maxim Belkin
f7e0705164
utils/ruby.sh: try installing portable Ruby ...
when no usable Ruby is found.
2020-05-15 15:12:20 -05:00
Maxim Belkin
44ef1abd1f
utils/ruby.sh: suppress standard error in test-ruby 2020-05-15 15:04:06 -05:00
Maxim Belkin
ec6e449f4f
utils/ruby.sh: unset HOMEBREW_RUBY_PATH unconditionally 2020-05-15 14:21:51 -05:00
Maxim Belkin
d21ecffae6
utils/ruby.sh: break down long ruby code in test-ruby 2020-05-15 14:20:03 -05:00
Maxim Belkin
cbc266bf0e
utils/ruby.sh: split long line in test-ruby() function
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-05-15 13:49:22 -05:00
Maxim Belkin
328c75fc33
Move logic related to HOMEBREW_RUBY_PATH to utils/ruby.sh 2020-05-15 10:30:45 -05:00
Shaun Jackman
133ee7966d shell: Use .profile unless .bash_profile exists 2020-05-13 09:30:02 -07:00
Mike McQuaid
84a110744a
utils/fork: check for inner exception command.
If it's not present then `ErrorDuringExecution` and `BuildError` don't
work correctly so better to fall back to a default `RuntimeError`.
2020-05-12 10:26:09 +01:00
Mike McQuaid
6123cdb767
Improve Homebrew Portable Ruby messaging
As-of https://github.com/Homebrew/homebrew-portable-ruby/pull/100 we've
removed ARM builds for Portable Ruby due to months of breakage.
Similarly, when we last bumped Portable Ruby the ARM build was much
delayed but, despite Homebrew/brew being completely unusable to anyone
using it on ARM in that case, no-one complained or filed issues.

Instead of attempting to maintain and update a Portable Ruby on niche
(Homebrew) platforms like ARM (or, in past/future PPC) improve the
messaging to provide users with a workaround.

Now we allow only a major/minor version match it should be pretty
doable for those users to install e.g. a prebuilt Ruby binary from a PPA
or built it from source if needed using `ruby-build` and `rbenv`.

The messaging could be improved further but we're somewhat limited by
`ruby.sh` and `vendor-install.sh` being separate. I'm tempted to combine
them (or at least have `vendor-install.sh` not be so generic as to not
be able to give Ruby-specific advice).
2020-05-02 13:53:45 +01:00
Eric Knibbe
fa1ce146e4 ruby.sh: allow running on older ruby versions 2020-04-22 17:36:00 -04:00