170 Commits

Author SHA1 Message Date
Mike McQuaid
3392226a10
Include more Ruby metadata files
- include `.ruby-version` and in the project root (and unignore in
  `.gitignore`) to improve editor support which expects these files
- use the `.ruby-version` in `docs/Gemfile` to use a consistent Ruby
  version here
- remove hardcoded Ruby versions from `workflows/docs` in favour of
  using the `.ruby-version` file instead
- use more consistent configuration in `workflows/docs` to match
  `workflows/tests`
2024-05-23 16:29:14 +01:00
Bo Anderson
d70e5d4071
.gitignore: add bigdecimal (native gem) 2024-05-23 14:30:09 +01:00
Patrick Linnane
6012533487
tapioca/config: remove unf & unf_ext
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2024-05-22 10:19:54 -07:00
Mike McQuaid
fd7df63b9d
dev-cmd/prof: add vernier support.
It's the newest great profiler for Ruby.
2024-05-17 23:57:46 +09:00
Mike McQuaid
bde9afa70e
Portable Ruby 3.3.1
Use the latest version of Portable Ruby.
2024-05-17 00:23:36 +01:00
Markus Reiter
9b6fb3d4df
Add redcarpet gem. 2024-05-01 11:35:21 +02:00
Issy Long
073e739005
Use the debug gem from portable Ruby
- This is cleaner than vendoring a whole bunch of new gems and pinning `psych`.
- Thanks for the pointer, Bo!
- It doesn't work, though?

```
❯ brew tests --only=migrator --debug
Error: cannot load such file -- debug/debug.so
Warning: Removed Sorbet lines from backtrace!
Rerun with `--verbose` to see the original backtrace
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/gems/3.1.0/gems/debug-1.6.3/lib/debug/frame_info.rb:16:in `require'
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/gems/3.1.0/gems/debug-1.6.3/lib/debug/frame_info.rb:16:in `rescue in <module:DEBUGGER__>'
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/gems/3.1.0/gems/debug-1.6.3/lib/debug/frame_info.rb:13:in `<module:DEBUGGER__>'
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/gems/3.1.0/gems/debug-1.6.3/lib/debug/frame_info.rb:3:in `<top (required)>'
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/gems/3.1.0/gems/debug-1.6.3/lib/debug/session.rb:31:in `require_relative'
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/gems/3.1.0/gems/debug-1.6.3/lib/debug/session.rb:31:in `<top (required)>'
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/gems/3.1.0/gems/debug-1.6.3/lib/debug.rb:3:in `require_relative'
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/gems/3.1.0/gems/debug-1.6.3/lib/debug.rb:3:in `<top (required)>'
/opt/homebrew/Library/Homebrew/dev-cmd/tests.rb:48:in `require'
/opt/homebrew/Library/Homebrew/dev-cmd/tests.rb:48:in `run'
/opt/homebrew/Library/Homebrew/brew.rb:89:in `<main>'
```
2024-04-17 23:26:40 +01:00
Issy Long
1daeb5bee0
Set up the debug gem for test debugging
- This processed that we'd requested a debugger, but didn't drop us into
  a debugging console until I
  [stopped the stdin disablement](https://github.com/Homebrew/brew/issues/16708#issuecomment-1953483970).

Usage:

```
❯ git diff
diff --git a/Library/Homebrew/test/migrator_spec.rb b/Library/Homebrew/test/migrator_spec.rb
index 87fadd5e95..db4700810a 100644
--- a/Library/Homebrew/test/migrator_spec.rb
+++ b/Library/Homebrew/test/migrator_spec.rb
@@ -69,6 +69,8 @@ RSpec.describe Migrator do
       tab.source["tap"] = "homebrew/core"
       tab.write

+      binding.break
+
       expect do
         described_class.new(new_formula, "oldname")
       end.to raise_error(Migrator::MigratorDifferentTapsError)

issyl0 at pictor in /opt/homebrew on bye-byebug
❯ brew tests --only=migrator --debug
Randomized with seed 59158
1 process for 1 spec, ~ 1 spec per process
.==> Relinking newname
.==> Unlinking oldname
...==> Moving oldname versions to /private/tmp/homebrew-tests-20240403-85464-3uogqr/cellar/newname
....==> Migrating formula oldname to newname
==> Unlinking oldname
==> Moving oldname versions to /private/tmp/homebrew-tests-20240403-85464-3uogqr/cellar/newname
==> Relinking newname
....[67, 76] in ~/migrator_spec.rb
    67|       tab = Tab.empty
    68|       tab.tabfile = HOMEBREW_CELLAR/"oldname/0.1/INSTALL_RECEIPT.json"
    69|       tab.source["tap"] = "homebrew/core"
    70|       tab.write
    71|
=>  72|       binding.break
    73|
    74|       expect do
    75|         described_class.new(new_formula, "oldname")
    76|       end.to raise_error(Migrator::MigratorDifferentTapsError)
=>#0    block in <top (required)> (3 levels) at ~/migrator_spec.rb:72
  #1    [C] BasicObject#instance_exec at /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.13.0/lib/rspec/core/example.rb:263
  # and 68 frames (use `bt' command for all frames)
(rdbg@/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/bin/rspec#85464) p tab
(rdbg@/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/bin/rspec#85464) p    # command(rdbg@/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/bin/rspec#85464) p     # command t    # command ta    # command tab    # command(rdbg@/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/bin/rspec#85464) p tab    # command
=> #<Tab:0x0000000107156be0 @aliases=[], @arch=nil, @built_as_bottle=false, @built_on={"os"=>"Macintosh", "os_version"=>"macOS 14", "cpu_family"=>"arm_firestorm_icestorm"}, @compiler=:clang, @homebrew_version="4.2.16-55-gc8f60ec-dirty", @installed_as_dependency=false, @installed_on_request=false, @loaded_from_api=false, @poured_from_bottle=false, @runtime_dependencies=nil, @source={"path"=>nil, "tap"=>"homebrew/core", "tap_git_head"=>nil, "spec"=>"stable", "versions"=>{"stable"=>nil, "head"=>nil, "version_scheme"=>0}}, @source_modified_time=0, @stdlib=nil, @tabfile=#<Pathname:/private/tmp/homebrew-tests-20240403-85464-3uogqr/cellar/oldname/0.1/INSTALL_RECEIPT.json>, @time=nil, @unused_options=[], @used_options=[]>
(rdbg@/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/bin/rspec#85464)
```
2024-04-17 22:25:12 +01:00
Issy Long
58fbaecedb
Add the debug gem for test debugging 2024-04-17 22:25:10 +01:00
Douglas Eichelberger
820d320835 Remove and refactor rspec-its use 2024-03-17 22:47:37 -07:00
Bo Anderson
754d580a91
Replace ronn with Kramdown's converter 2024-03-10 22:31:38 +00:00
Carl Fürstenberg
aadd7bbbd8 Be more lenient with the unignore of Library in .gitignore
vscode for example has a issue in that it won't unignore Library if the
unignore line ends with a slash.
2024-03-02 17:48:18 +01:00
Douglas Eichelberger
07fad780de Remove hidden defs references 2024-02-11 20:27:38 -08:00
Douglas Eichelberger
bec27d44c6 Remove stray ActiveSupport references 2024-01-26 15:38:13 -08:00
Douglas Eichelberger
53bba9c00f cleanup 2024-01-22 10:52:43 -08:00
Douglas Eichelberger
8efe73b32c Add Object#deep_dup to extend/ 2024-01-22 10:52:43 -08:00
Douglas Eichelberger
f6c7eb7124 Add hash/keys to extend/ 2024-01-19 13:36:17 -08:00
Douglas Eichelberger
a87cdf0d21 Add Hash#deep_transform_values to extend/ 2024-01-19 13:36:16 -08:00
Douglas Eichelberger
0cdd4eee3b Add Hash#deep_merge to extend/ 2024-01-19 13:36:16 -08:00
Douglas Eichelberger
c02520f604 Fix style/type violations 2024-01-19 13:36:16 -08:00
Douglas Eichelberger
2e21efff46 Add ActiveSupport String#exclude? to extend/ 2024-01-19 13:35:34 -08:00
Douglas Eichelberger
08e12b2383 Remove ActiveSupport Array access core extensions 2024-01-19 13:34:52 -08:00
Douglas Eichelberger
7b1a3c7535 Remove ActiveSupport String indent core extension 2024-01-08 13:36:45 -08:00
Douglas Eichelberger
b3522b3bb8 Remove ActiveSupport String filters 2024-01-02 16:56:27 -08:00
Bo Anderson
89531e9ff3
Update all dependencies 2023-12-15 16:24:46 +00:00
Douglas Eichelberger
0ce84387fd Also remove Hash#slice! 2023-12-12 10:41:47 -08:00
Douglas Eichelberger
2f22ad40c8 Add h Hash#except to gitignore list 2023-12-12 10:12:35 -08:00
Bo Anderson
0bc2028c44
Remove vendored Ruby 2.6 gems 2023-12-11 16:30:01 +00:00
Bo Anderson
c9974cd828
Vendor Ruby 3.1 gems 2023-11-30 06:09:56 +00:00
Douglas Eichelberger
61667a8023 Ignore non-required dependencies 2023-11-26 09:56:17 -08:00
Douglas Eichelberger
00ba09d73d Remove use of ActiveSupport try 2023-11-05 09:28:19 -08:00
Bo Anderson
71f558229a
Test on Ruby 3.1 2023-09-29 04:46:16 +01:00
Bo Anderson
582049454f
vendor/bundle/ruby: cleanup unneeded files 2023-09-26 18:39:57 +01:00
Bo Anderson
9cf0d34ee0
Move gem group setting to separate, cacheable file 2023-09-13 14:04:13 +01:00
Mike McQuaid
c5afd5d056
macOS .pkg improvements
- don't include GitHub Actions credentials
- generate and include RTF version of Homebrew BSD license
- create nicer installer with `productbuild`
- customise welcome/conclusion messages
- add Homebrew logo as a background image
- remove unnecessary `preinstall` script
- cleanup `postinstall` script to pass `brew doctor`
- use `Distribution.xml` for a nicer installer
- require CLT or Xcode rather than using our hacks to try and install
  CLT during installation
2023-07-25 15:47:34 +01:00
Mike McQuaid
043b9512e4
Merge pull request #15487 from Homebrew/dependabot/bundler/Library/Homebrew/json_schemer-0.2.25
build(deps): bump json_schemer from 0.2.24 to 0.2.25 in /Library/Homebrew
2023-06-28 12:53:32 +01:00
Mike McQuaid
b9c4671139
gitignore: ignore more Bundler files. 2023-06-28 11:45:39 +01:00
Mike McQuaid
80f96ca5fd
gitignore: fix activesupport ignores. 2023-06-28 11:23:00 +01:00
Douglas Eichelberger
03ee70b1ae Remove kernel/reporting extension 2023-04-26 09:16:55 -07:00
Douglas Eichelberger
e16f4ef1c2 Ignore unused transitive dependencies: tzinfo & zeitwerk 2023-04-25 16:46:33 -07:00
Douglas Eichelberger
6f9aa98e52 Update .gitignore 2023-04-25 11:08:08 -07:00
Douglas Eichelberger
f52cbbb9da
Vendor mechanize gem outside Gemfile
We only need a single file and it avoids pulling in e.g. `nokogiri`
which is vulnerable.

Allow updating it using `brew vendor-gems`.
2023-04-24 14:03:55 +01:00
apainintheneck
6ab6d7c8ee irb: save repl history
This enables history for `brew irb` sessions.
It saves that history to the repository directory.
2023-03-06 22:24:14 -08:00
apainintheneck
39c6f7d6fb Stop including *flight block source in cask API
Originally we were going to try and load the *flight blocks from the API
but we ended up going with downloading the caskfile for the subset of
casks that need this functionality for consisty's sake.

This reverts the following commits from most recent to oldest:
- ffc74a51fb32b66a4cd8bc41dbd076dd23d9100e
- e5616e94fe42505434c330be35eeafef2739944f
- d1490c3d5c087d00f2bca1787cce331202b195c5
- 7ca5a5d9a71a73f21bbb8555a38048f027bee89b
- 2d5d132713d0701d02d5ff33e9918812d13d2a83

It also changes how *flight blocks are handled in `.to_h`.
Essentially, when *flight blocks exist they are just included
as a hash of the artifact to nil to indicate that they exist.

More information isn't necessary since we don't evaluate
the current source code in the *flight artifacts that
we get from the API.
2023-02-13 21:22:18 -08:00
Rylan Polster
e5616e94fe
Vendor method_source gem 2023-01-03 23:27:31 -05:00
apainintheneck
d318c56013 Add integration tests for profiler 2022-12-30 19:37:32 -08:00
Sean Molenaar
72b3348fb1
feature: generate macOS pkg files 2022-12-19 21:26:24 +01:00
Bo Anderson
796bad98ff
Allow gem installation on Rubies other than 2.6 2022-11-05 15:23:19 +00:00
Mike McQuaid
dd39b2be64
Add VSCode devcontainers
Should be useful for getting a development environment setup quickly.
2022-10-27 09:18:49 +01:00
Bo Anderson
e4264c9f35
Replace sorbet-runtime-stub with sorbet-runtime 2022-07-19 23:43:14 +01:00