Integrity | The easy and fun automated continuous integration server
Integrity is the angel watching over your shoulder while you code. As soon as you push your commits, it builds, runs your tests, and makes sure everything works fine.
SameSite cookies
Browser defaults are shifting toward SameSite=Lax, making cross-site cookie behavior stricter and exposing iframe, API, and non-GET request flows that need SameSite=None or Strict.
open-next-failure: An alias to speed up test debugging
Open the next failing spec directly in the IDE to cut down the back-and-forth between test runs and debugging. RSpec --next-failure and JSON output support the workflow.
Detect mobile or touch devices on both server and client
Shared device detection on Rails server and browser client keeps touch-specific behavior available beyond CSS-only or feature-detection hacks.
How to organize large I18n dictionaries in Ruby on Rails
Rails can split large translation files across config/locales to keep model, view, and boilerplate strings manageable.
How to write complex migrations in Rails
Complex Rails schema changes need SQL, embedded migration models, or adapter helpers when simple add_column and update calls cannot handle existing data safely.
How Rails chooses error pages (404, 500, ...) for exceptions
Rails maps unhandled exceptions to HTTP status codes and error pages via action_dispatch.rescue_responses, and custom classes can be treated as 404 or 500 responses.
An incomplete guide to migrate a Rails application from paperclip to carrierwave
Rails file storage migration with background jobs, reruns, and URL rewrites; large media backfills need careful testing, queue tuning, and fallback handling.
How to not die with ActionView::MissingTemplate when clients request weird formats
HTTP clients can request unsupported formats and trigger ActionView::MissingTemplate when only HTML templates exist; restricting routes or responding with 406 avoids the error.
How to enable pretty IRB inspection for your Ruby class
Custom Ruby objects can gain colored, multiline IRB output by defining pretty_print; pretty_inspect is a simpler fallback when pretty printing is not needed.
Transfer records to restore database entries (with Marshal)
Move exact database records between systems by serializing Ruby objects with Marshal and Base64 when a direct export/import needs to preserve IDs and state.
Writing a README for a project
A project README gives new developers a quick overview, key architecture, and setup notes. Keep it concise, focused on essentials, and separate detailed class documentation.
Rails: Concurrency-safe API request counting with `upsert`
Lost updates make Ruby-side counter increments unsafe under concurrent API traffic; a Postgres upsert with a unique index performs atomic request counting.
Debug flaky tests with an Unpoly observeDelay
Flaky integration tests can outrun watchInputDelay, causing Unpoly field updates to overwrite typed input before requests start. Lowering the delay or signaling CapybaraLockstep reduces failures.
Use Time.current / Date.current / DateTime.current on projects that have a time zone
Time zone-aware projects need Time.current, Date.current, and DateTime.current so values persist correctly; Time.now can write timestamps with the wrong zone.
Rails: Testing exceptions with the rescue_responses setting
Rails 7.2 changes show_exceptions defaults in tests, so rescued RecordNotFound often becomes a 404 response instead of a raised exception.
JavaScript: Sharing content with the native share dialog
Native share dialogs on mobile and desktop let users hand off links, text, and titles to installed apps; navigator.share works only on HTTPS pages.
JavaScript: Comparing objects or arrays for equality (not reference)
JavaScript has no built-in deep equality check for objects and arrays; use _.isEqual(), up.util.isEqual(), or isDeepStrictEqual() for value comparison.
Modern HTTP Status codes for redirecting
HTTP redirect handling differs for GET and non-GET requests; newer codes preserve or change the method explicitly, avoiding browser-dependent behavior from 301 and 302.
What we know about PDFKit
PDF generation from Rails uses a WebKit-based wrapper around wkhtmltopdf, with print styling, headers, footers, and binary-version pitfalls.
How to debug file system access in a Rails application
Rails apps can make hidden file checks that slow requests, especially on networked storage. strace reveals unnecessary stat calls and other system calls.
Bundler in deploy mode shares gems between patch-level Ruby versions
Patch-level Ruby updates can break native gems when Bundler shares bundles across 2.6.x versions, leaving failed deploys with incompatible extensions.
Migration from the Asset Pipeline to Webpacker
Moving a Rails app from the Asset Pipeline to Webpacker requires inventorying bundled libraries, repackaging legacy assets, and adjusting deployment for pack-based assets.
Concurrency issues with find-as-you-type boxes
Live search boxes can show stale results when AJAX responses arrive out of order, causing flashing and mismatched suggestions. Serializing requests or discarding outdated responses avoids the race condition.