CJ Avilla's Avatar

CJ Avilla

@cjavilla.bsky.social

Ruby Developer

118 Followers  |  251 Following  |  7 Posts  |  Joined: 26.05.2023  |  1.9232

Latest posts by cjavilla.bsky.social on Bluesky

Preview
OpenAPI Overlays to avoid API oversharing Use an OpenAPI Overlay (or Overlays) to remove deprecated, experimental or private endpoints from your OpenAPI description before publishing to different audiences.
13.12.2024 13:18 โ€” ๐Ÿ‘ 5    ๐Ÿ” 2    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

First step when opening a new gmail account:

14.11.2024 14:17 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
  "vim.normalModeKeyBindings": [
    {
      "before": ["<leader>", "a"],
      "commands": [
        {
          "command": "workbench.action.terminal.sendSequence",
          "args": {
            "text": "\u000Dclear\u000Dbin/rails test \"${file}\"\u000D"
          }
        }
      ]
    },
    {
      "before": ["<leader>", "h"],
      "commands": [
        {
          "command": "workbench.action.terminal.sendSequence",
          "args": {
            "text": "\u000Dclear\u000Dbin/rails test \"${file}:${lineNumber}\"\u000D"
          }
        }
      ]
    },

"vim.normalModeKeyBindings": [ { "before": ["<leader>", "a"], "commands": [ { "command": "workbench.action.terminal.sendSequence", "args": { "text": "\u000Dclear\u000Dbin/rails test \"${file}\"\u000D" } } ] }, { "before": ["<leader>", "h"], "commands": [ { "command": "workbench.action.terminal.sendSequence", "args": { "text": "\u000Dclear\u000Dbin/rails test \"${file}:${lineNumber}\"\u000D" } } ] },

vim mode keybindings for VS Code (Cursor) for running rails tests with "leader-a" (all) or "leader-h" (nearest)

One thing that it doesn't do well is if I have rails console open in the terminal, I want it to find the first or create a new terminal profile with zsh.

Any ideas?

08.11.2024 19:58 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Short Ruby Newsletter - edition 112 The one where Jeremy launched the Liminal forum and with many releases - Ruby 3.2.6, Rails 8.0.0.rc2, Hanami 2.0.0.rc1, and discussing Fibers

The @shortruby.com - edition 112 is out

Read it full here newsletter.shortruby.com/p/edition-112

04.11.2024 09:21 โ€” ๐Ÿ‘ 16    ๐Ÿ” 7    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 1

ah nice. I'll try that, I usually lean hard on the background job retries for this from Sidekiq

25.10.2024 15:56 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
def assert_flashed(message)
  retry_count = 0
  max_retries = 3
  retry_delay = 0.5

  begin
    assert_selector "#toast", wait: 5               
    assert_text message
  rescue Minitest::Assertion => e
    if (retry_count += 1) <= max_retries
      sleep retry_delay
      retry
    else
      raise e
    end
  end
end

def assert_flashed(message) retry_count = 0 max_retries = 3 retry_delay = 0.5 begin assert_selector "#toast", wait: 5 assert_text message rescue Minitest::Assertion => e if (retry_count += 1) <= max_retries sleep retry_delay retry else raise e end end end

I forgot you could use `retry` inside a `rescue` block like this!

25.10.2024 12:52 โ€” ๐Ÿ‘ 10    ๐Ÿ” 1    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Checkout @joshuawood.net starter packs. This is the founder one and thereโ€™s one for rails, too!

go.bsky.app/EGczjGA

25.10.2024 09:49 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Has anyone had success setting up PaperTrail as a log drain destination for Vercel?

Seems like Vercel requires verifying the endpoint, but I don't see a way to verify ownership from the paper trail side.

14.06.2023 17:49 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Any good podcasts for staying up to date with the latest in the Next.js ecosystem? Specifically the T3 stack, Vercel, drizzle, zod, typescript, PlanetScale news.

28.05.2023 12:39 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

@cjavilla is following 19 prominent accounts