ombulabs/claude-code_rails-upgrade-skill / rails-upgrade
rails-upgrade
VerifiedAnalyzes Rails applications and generates comprehensive upgrade reports with breaking changes, deprecations, and step-by-step migration guides for Rails 2.3 through 8.1. Use when upgrading Rails applications, planning multi-hop upgrades, querying version-specific changes, or answering what stands between the app and the next Rails version. Based on FastRuby.io methodology and "The Complete Guide to Upgrade Rails" ebook.
detection-scripts/patterns/rails-71-patterns.expectations.yml
View on GitHub# Fixture expectations for rails-71-patterns.yml.
#
# Keyed by variable_name (matching the entries in rails-71-patterns.yml). For
# each pattern you cover, list:
# match - lines the pattern MUST flag (the real breaking-change shapes)
# no_match - lines it MUST NOT flag (safe code + known false-positive traps)
#
# A line is "flagged" when the entry's `pattern` regex matches it AND the
# entry's `exclude` regex (when present) does not: a per-line grep + grep -v.
#
# Run with:
# bin/test-patterns rails-upgrade/detection-scripts/patterns/rails-71-patterns.yml
#
# The patterns without an entry here predate the expectations tooling. Add
# entries as they are revisited.
CACHE_FORMAT_VERSION_61:
match:
# load_defaults below 7.0 leaves the cache format at 6.1
- " config.load_defaults 6.1"
- " config.load_defaults \"5.2\""
- " config.load_defaults(6.0)"
# the 6.1 format set explicitly
- " config.active_support.cache_format_version = 6.1"
- "ActiveSupport::Cache.format_version = 6.1"
no_match:
# load_defaults 7.0 and 7.1 set the 7.0 and 7.1 formats
- " config.load_defaults 7.0"
- " config.load_defaults 7.1"
- " config.active_support.cache_format_version = 7.0"
# commented-out lines, including the new_framework_defaults template
- " # config.load_defaults 6.1"
- "# Rails.application.config.active_support.cache_format_version = 7.0"
CSP_MIDDLEWARE_CONSTANTS:
match:
# the three constants 7.1 removes from the middleware class
- " headers[ActionDispatch::ContentSecurityPolicy::Middleware::POLICY]"
- " expect(response.headers[ActionDispatch::ContentSecurityPolicy::Middleware::POLICY_REPORT_ONLY]).to be_present"
- "ContentSecurityPolicy::Middleware::CONTENT_TYPE"
no_match:
# the header name as a string works on both versions
- " expect(response.headers[\"Content-Security-Policy\"]).to be_present"
# the middleware class itself still exists
- "config.middleware.use ActionDispatch::ContentSecurityPolicy::Middleware"
SECRETS_YML_ENC:
match:
# every Rails.application.secrets call warns on 7.1
- " api_key = Rails.application.secrets.stripe_key"
- " Rails.application.secrets[:api_key]"
# the app reads config/secrets.yml.enc
- " config.read_encrypted_secrets = true"
- "# keys live in config/secrets.yml.enc"
no_match:
- " config.read_encrypted_secrets = false"
# the replacement API and secret_key_base itself are fine
- " Rails.application.credentials.stripe_key"
- " Rails.application.secret_key_base"
RUBY_VERSION:
# Rails 7.1 needs Ruby >= 2.7.3 (activerecord uses leading-argument
# forwarding). Lines come from the Gemfile, .ruby-version and .tool-versions.
match:
- "ruby \"2.7.2\""
- "ruby \"2.7.0\""
- "2.7.1"
- "ruby-2.7.2"
- "ruby 2.6.10"
- "ruby \"~> 2.6.3\""
- "ruby '~> 1.9'"
no_match:
- "ruby \"2.7.3\""
- "ruby \"2.7.8\""
- "ruby \"~> 2.7.1\""
- "ruby \"~> 2.6\""
- "ruby \">= 2.7.0\""
- "2.7.10"
- "3.0.6"
- "gem \"rack\", \"2.7.1\""
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| planning-and-task-breakdownaddyosmani/agent-skillsBreaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| screenpipethedotmack/claude-memSearch screen and audio history recorded by Screenpipe and optionally save selected context into claude-mem. Use when the user asks to recall desktop activity, a meeting, or something seen in another app through Screenpipe. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| contact-widgetnexu-io/open-designSelf-contained floating chat widget with welcome screen, social links, meeting button, and message input. Single HTML file, zero dependencies. | Stars: 108k | Updated | Claude CodeCodex | Verified | Install |
| meeting-notesnexu-io/open-designMeeting notes page — title bar with attendees, agenda checklist, decisions block, action items table with owners + dates, and a "next meeting" footer. Use when the brief mentions "meeting notes", "minutes", "1:1 notes", "all-hands recap", or "会议纪要". | Stars: 108k | Updated | Claude CodeCodex | Verified | Install |