Advertisement Β· 728 Γ— 90

Posts by Matheus Richard

Preview
Introducing Test Budget: a linter for test performance Your test suite didn’t get slow all at once. It won’t get fast all at once either. Start by making sure it stops getting worse.

No one sets out to write a slow test, and yet it happens. Prevent slow tests from creeping into your test suite again! Tests are not enough, we need *fast* tests!

thoughtbot.com/blog/introdu...

1 month ago 0 0 0 0
Preview
Combine Capybara selectors to avoid the sequential timeout trap How I shaved over a minute off a test suite with a one-line change.

Here's one of those things that are easy to miss on code review and will make your tests super slow. Good news: it's easy to fix!

thoughtbot.com/blog/combine...

1 month ago 0 0 0 0
ActionView::Helpers::FormTagHelper Action View Form Tag HelpersΒΆ ↑ Provides a number of methods for creating form tags that don’t rely on an Active Record object assigned to the template like FormHelper does.

TIL about Rails' image_submit_tag

api.rubyonrails.org/v8.1.2/class...

3 months ago 1 0 0 0

This was a fun one to write!

3 months ago 1 0 0 0

I love seeing this UI evolve! What are you using for pagination?

4 months ago 3 0 1 0
Time.days_in_month(2) # defaults to current year
# => 28
Time.days_in_month(2, 2024)
# => 29
Time.days_in_year # defaults to current year
# => 365
Time.days_in_year(2024)
# => 366

Time.days_in_month(2) # defaults to current year # => 28 Time.days_in_month(2, 2024) # => 29 Time.days_in_year # defaults to current year # => 365 Time.days_in_year(2024) # => 366

Today I learned about Rails' Time.days_in_month and Time.days_in_year. So handy!

5 months ago 3 0 0 0
Post image

πŸŽ‰ end_of_life 1.0.0.alpha is released! It includes:

- Macos install via homebrew
- Support for scanning EOL Node.js versions
- Support for detecting versions from `mise.toml`.
- A new `check` command to check if specific product releases are EOL
- A revamped CLI

Stay updated!

5 months ago 0 0 0 0
Preview
Git Large File Storage Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server like GitHub.co...

TIL about Git LFS: An open source Git extension for versioning large files

git-lfs.com

6 months ago 4 2 0 0
Advertisement

Wait, what? Where?

6 months ago 0 0 1 0

Does the bot log in? How do you handle auth?

6 months ago 0 0 1 0

Beautiful!

6 months ago 0 0 0 0

Where's @marcoroth.dev to add a proper parser to Stimulus? πŸ™ˆ

6 months ago 1 0 1 0

From the little I know it seems a lot more than that? Most of the times I'm good with plain HTML and I want to add a few things here and there. Svelt seems like an overkill solution for me?

6 months ago 0 0 1 0

I keep wanting to try it, but at the same time I so don't want another JS tool.

6 months ago 0 0 1 0

I'm curious about what the European developer interests are (compared to what also) πŸ‘€

7 months ago 3 0 0 0

NOOOOO! I didn't have my chance to attend!

7 months ago 3 0 0 0

Just shaved 200-250ms from a CLI app by just requiring dependencies only when they're needed.

It might not seem much, but it really matters to get that snappy feel.

7 months ago 1 0 0 0
The RubyGems.org 404 page

The RubyGems.org 404 page

This is my favorite 404 page

7 months ago 2 0 1 0
Advertisement

Great font in those slides!

7 months ago 2 0 0 0
Post image

Did you know that Rails 7.1 stops receiving security updates in 3 weeks? Wished that you had a tool that would inform you about this kind of stuff?

Well, end_of_life v0.5 was just released and it now supports Rails!

Check it out: github.com/MatheusRich/...

7 months ago 0 0 0 0

This look amazing. I might not need to add

config.action_view.annotate_rendered_view_with_filenames = true

to every app now

7 months ago 1 0 1 0

That's exactly how it works. It uses Rails main by default, but you can specify any commit you want.

It'll use the same name as your app, so you get meaningful diffs only.

7 months ago 1 0 1 0
Preview
Add support for scanning EOL Rails versions Β· MatheusRich/end_of_life@ba9a92a End of Life looks for an exact Rails version on the `Gemfile` file or `Gemfile.lock`.

Then, the easy change: adding support for Rails was just a 27loc change (not including tests).

Amazing payoff!

github.com/MatheusRich/...

7 months ago 0 0 0 0

The code was not written in a generic way, so I followed Kent Beck's advice and started to make the change easy.

It took a diff of +1160/-927 , and it was mostly backwards compatible. Luckily I had tests to ensure nothing was broken.

7 months ago 0 0 1 0

I've hacked the first version of end_of_life in a weekend. I had limited time, so I decided to only support Ruby. It served me well for years, but I thought it was time to expand support for other tools (Rails, Node, Python, databases, etc).

7 months ago 0 0 1 0
Preview
Add RuboCop cache to GHA workflow templates Β· rails/rails@ceb0678

For example, I just found-out that the they add caching to rubocop runs on CI!

github.com/rails/rails/...

7 months ago 1 0 0 0
Advertisement
Preview
GitHub - MatheusRich/rails-diff: Compare Rails-generated files with the ones in your repository Compare Rails-generated files with the ones in your repository - MatheusRich/rails-diff

If you wanna use Rails 8.1 today, you can check if there's anything new in the dotfiles, Dockerfile, or the generated authentication system using rails-diff:

github.com/MatheusRich/...

7 months ago 2 0 2 0

I actually dig it.

7 months ago 1 0 1 0

The amount of event listeners LLMs suggest when writing Stimulus controllers makes me think most people are not making the most out of Stimulus targets.

7 months ago 0 0 0 0
Zen Browser Beautifully designed, privacy-focused, and packed with features.

TIL about the Zen browser. Looks cool!

zen-browser.app

7 months ago 0 0 0 0