Skip to content

Modernize dotfiles infrastructure and update deprecated tools#23

Merged
alanrrb merged 29 commits intomasterfrom
modernize-test-infrastructure
Mar 22, 2026
Merged

Modernize dotfiles infrastructure and update deprecated tools#23
alanrrb merged 29 commits intomasterfrom
modernize-test-infrastructure

Conversation

@alanrrb
Copy link
Member

@alanrrb alanrrb commented Mar 22, 2026

Motivação

O projeto estava com diversas ferramentas desatualizadas ou descontinuadas (RVM, Node 12 via nodesource, Docker Compose v1, Syntastic, Atom, etc) e a infraestrutura de testes com Vagrant dependia do VirtualBox que não funciona bem no Apple Silicon.

Esta PR moderniza toda a stack, atualiza dependências e melhora a documentação.

Gerenciamento de versões

  • RVM → mise: substitui RVM e nodesource por mise, que gerencia Ruby e Node.js com um único tool. Instalação simples (sem chaves GPG), binários pré-compilados, e rápido no startup do shell.
  • O tema peepcode (RPROMPT) agora mostra ruby-X.Y.Z node-X.Y.Z via mise em vez de rvm-prompt.
  • ~/.local/bin adicionado ao PATH no zshenv (onde o mise é instalado).

Infraestrutura de testes

  • macOS: Vagrant com vagrant_utm plugin usando a box bento/ubuntu-24.04. Permite testar com interface gráfica via UTM (terminal colors, fonts, vim, tmux).
  • Linux: Script tests/test_linux.sh usando Multipass com diretório montado para teste headless rápido.
  • O provisioning instala apenas curl — o install.sh é executado manualmente para permitir interação com chsh e seleção de tema no Gogh.
  • tests/README.md com instruções completas de setup.

Scripts de instalação

install.sh

  • #!/bin/sh#!/bin/bash com set -eu (falha em caso de erro)
  • returnexit (funciona com bash install.sh, não só source)
  • cp -rrsync com excludes para evitar problemas de permissão em mounts VirtFS
  • vim-plug baixado direto do GitHub em vez de copiado do repo (evita erro de permissão e garante versão mais recente)
  • Dependências de build do Ruby adicionadas (libssl-dev, libreadline-dev, etc)
  • mise use --global em vez de mise install para ativar Ruby e Node.js corretamente
  • Binários pré-compilados do Ruby (ruby.compile=false) para evitar falhas de compilação do OpenSSL

mac.sh

  • Instalador do Homebrew atualizado para o método atual
  • hubgh (GitHub CLI oficial)
  • reattach-to-user-namespace removido (desnecessário desde tmux 2.6+)
  • Flags obsoletas do macvim removidas
  • Atom (descontinuado) → VS Code
  • brew cask installbrew install --cask

ubuntu.sh

  • Docker: docker.io (pacote Ubuntu) → docker-ce do repositório oficial do Docker
  • Docker Compose: binário standalone v1 → plugin v2 (docker-compose-plugin)
  • Tmux: 3.1b → 3.6a (versão configurável via TMUX_VERSION)
  • Gogh: URL git.io (descontinuado) → URL direta do repositório
  • wgetcurl (consistência com o resto do projeto)
  • Output do build do tmux visível (removido > /dev/null 2>&1)
  • Docker opcional com SKIP_DOCKER=1

Shell (zsh)

  • HISTSIZE / SAVEHIST: 4096 → 50000
  • Guards adicionados para zsh-syntax-highlighting e mise (não quebra se não instalados)
  • TERM=screen-256color aplicado apenas no Linux (macOS não precisa)
  • Completions removidas para ferramentas descontinuadas ou removidas: _docker-compose, _rvm, _boot2docker, _bower, _docker-machine

Aliases

  • docker-composedocker compose (Compose v2)
  • gem install --no-ri --no-rdoc--no-document (RubyGems 3.0+)
  • rake db:migrate/rollback/redo e rake routesrails (Rails 5+)
  • rspec specrspec (argumento redundante)
  • gpom agora faz push da branch atual em vez de hardcoded master
  • brew prune removido (já incluído no brew cleanup)
  • Conflito de alias gi resolvido: vim .gitignore renomeado para gie
  • Check do mvim usa command -v em vez de mvim --version (mais rápido no startup)

Vim

  • scrooloose/syntasticdense-analysis/ale (linting assíncrono, não trava o vim)
  • scrooloose/nerdtreepreservim/nerdtree (repo renomeado)
  • vim-scripts/tCommenttomtom/tcomment_vim (repo correto do autor)
  • Config do syntastic removida do vimrc
  • Conflito de <Leader>p resolvido (removido binding do CtrlP, mantido clipboard paste)

Git

  • git stash savegit stash push (depreciado desde git 2.16)
  • GdiffGdiffsplit (depreciado no fugitive)
  • push.default: upstreamsimple (recusa push se nome do branch local difere do remoto)

IRB/Pry

  • Prompt atualizado para API Pry::Prompt.new (Pry 0.13+) com fallback para versões antigas
  • awesome_printamazing_print (renomeado), com fallback para awesome_print
  • Integração via .pry! em vez de Pry.config.print (depreciado)
  • CodeRay removido (Pry moderno não usa mais) junto com escaped_colors.rb e unescaped_colors.rb

Tmux

  • reattach-to-user-namespace removido do template de copy mode do macOS (desnecessário desde tmux 2.6+)

Documentação

  • README.md: reescrito com estrutura clara — o que está incluído, instalação, tabela de customização, convenções
  • Vim.md: reescrito com tabelas organizadas por categoria cobrindo todos os key mappings
  • Tmux.md: reescrito com tabelas para sessions, windows, panes, copy mode e status bar
  • CLAUDE.md: criado com contexto do projeto para Claude Code
  • tests/README.md: instruções de setup para UTM/Vagrant (macOS) e Multipass (Linux)

Test plan

  • Instalação completa testada em Ubuntu 24.04 via Vagrant + UTM
  • Testar instalação completa em uma máquina macOS limpa
  • Verificar SKIP_DOCKER=1 pula instalação do Docker
  • Verificar plugins do vim instalam corretamente (PlugInstall)
  • Verificar mise instala Ruby e Node.js
  • Verificar tema zsh mostra versões ruby/node no RPROMPT

alanrrb added 22 commits March 21, 2026 15:22
Add platform-specific test scripts:
- tests/test_mac.sh: uses OrbStack to spin up Ubuntu 24.04 VM on macOS
- tests/test_linux.sh: uses Multipass to spin up Ubuntu 24.04 VM on Linux

Add CLAUDE.md for Claude Code context.
mise is faster, simpler to install (no GPG keys), and manages
both Ruby and Node.js — removing the need for separate tools
(RVM, nodesource, yarn repo).
Use docker-ce from Docker's apt repository instead of the outdated
docker.io Ubuntu package. Docker Compose v2 is now installed as a
plugin (docker-compose-plugin) instead of the standalone v1 binary.
…optional

- Replace wget with curl for consistency across the project
- Update Gogh terminal colors URL from deprecated git.io shortlink
  to the direct GitHub raw URL
- Show tmux build output instead of suppressing it
- Make Docker installation skippable with SKIP_DOCKER=1
- Quote variables to handle paths with spaces
Activate mise in the shell before running rake install so Ruby
comes from mise instead of apt. Also fix return/exit, add set -eu,
remove duplicated dconf-cli, and simplify unsupported OS handling.
- Update Homebrew install command to current method
- Replace hub with gh (GitHub CLI)
- Remove reattach-to-user-namespace (unnecessary since tmux 2.6+)
- Remove macvim obsolete flags
- Replace Atom (discontinued) with VS Code
- Use brew install --cask (replaces deprecated brew cask install)
UTM provides a full Ubuntu Desktop VM with graphical interface,
allowing visual verification of terminal colors, fonts, and themes.
Add tests/README.md with setup and usage instructions for both
macOS (UTM) and Linux (Multipass) testing.
Add step-by-step instructions for creating the VM, installing Ubuntu,
configuring directory sharing, mounting shared folders, and verifying
the dotfiles installation.
Unlike Multipass, UTM requires manual VM creation and configuration.
The script only wrapped trivial start/stop commands. Full instructions
are in tests/README.md.
Replace VirtualBox provider with vagrant_utm plugin, enabling
Vagrant automation with UTM's graphical VM on macOS.
Update tests/README.md with Vagrant+UTM setup instructions.
- Add Ruby build dependencies (libssl-dev, libreadline-dev, etc)
- Use mise precompiled binaries (ruby.compile=false)
- Use mise use --global instead of mise install for proper activation
- Replace cp with rsync to handle VirtFS permission issues
- Download vim-plug from GitHub instead of copying from mount
- Update peepcode theme RPROMPT: replace rvm-prompt with mise
  showing ruby-X.Y.Z and node-X.Y.Z
- Fix sh -> bash in test scripts and README
- Add --provider=utm to README commands
Use bento box which is more stable and well-maintained.
Keep provisioning minimal (only curl) so the user can run
install.sh interactively (chsh password, Gogh theme selection).
Add rsync as a dependency in install.sh for local installs.
- docker-compose → docker compose (Compose v2 plugin)
- gem install --no-ri --no-rdoc → --no-document (RubyGems 3.0+)
- rake db:migrate/rollback/redo → rails (Rails 5+)
- rake routes → rails routes
- rspec spec → rspec (argument redundant)
- gpom now pushes current branch instead of hardcoded master
- brew prune removed (included in brew cleanup)
- Fix gi alias conflict: rename gitignore edit to gie
- Use command -v instead of mvim --version for shell startup speed
…ions

- Increase HISTSIZE/SAVEHIST from 4096 to 50000
- Add guards for zsh-syntax-highlighting and mise (don't error if missing)
- Only set TERM=screen-256color on Linux
- Add ~/.local/bin to PATH (mise install location)
- Fix peepcode RPROMPT to not show empty prefixes without mise
- Remove outdated completions: docker-compose, rvm, boot2docker,
  bower, docker-machine
- scrooloose/nerdtree → preservim/nerdtree (repo renamed)
- scrooloose/syntastic → dense-analysis/ale (async linting)
- vim-scripts/tComment → tomtom/tcomment_vim (correct repo)
- Remove syntastic config from vimrc
- Fix <Leader>p conflict: remove CtrlP binding, keep clipboard paste
- git stash save → git stash push (deprecated since git 2.16)
- Gdiff → Gdiffsplit (deprecated in fugitive)
- push.default upstream → simple (safer, refuses push on name mismatch)
- Use Pry::Prompt.new API (Pry 0.13+) with fallback for older versions
- Replace awesome_print with amazing_print (with fallback)
- Use modern .pry! integration instead of deprecated Pry.config.print
- Remove CodeRay customization and color files (no longer used by Pry)
- Update RVM reference to mise in comments
No longer needed since tmux 2.6+ — pbcopy works natively in tmux.
README rewritten with clearer structure: what's included, install
instructions using bash (not sh), customization table, key conventions,
and links to testing docs. CLAUDE.md updated with testing section,
mise references, and corrected push default.
Replace sparse lists with organized tables covering all custom
key mappings. Add sections for navigation, search, copy mode,
pane management, and status bar description.
@alanrrb alanrrb force-pushed the modernize-test-infrastructure branch from 25cdd22 to 0850b9c Compare March 22, 2026 00:50
alanrrb added 7 commits March 21, 2026 22:01
Workflow tests the full install.sh on both platforms, then verifies
mise, symlinks, and vim-plug are set up correctly.

Skip chsh in Rakefile and Gogh in ubuntu.sh when CI=true
(both require interactive input).
Node.js download from nodejs.org timed out at the default 30s.
mise installs tools in parallel by default. On CI, the Node download
was timing out while waiting for Ruby to compile. Installing
sequentially avoids the issue.
mac.sh now runs before mise in install.sh so Homebrew and build
dependencies (openssl, libyaml, readline) are available for
Ruby compilation. Made Homebrew installation idempotent.
The mac.sh runs in a subshell (bash), so its environment changes
don't propagate. Explicitly eval brew shellenv after mac.sh so
libyaml and openssl are visible to ruby-build via mise.
@alanrrb alanrrb merged commit 1af5589 into master Mar 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant