contracts.ruby VS Rails style guide

Compare contracts.ruby vs Rails style guide and see what are their differences.

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
contracts.ruby Rails style guide
5 4
1,441 6,450
- 0.3%
1.4 4.3
about 1 year ago 2 months ago
Ruby
BSD 2-clause "Simplified" License -
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

contracts.ruby

Posts with mentions or reviews of contracts.ruby. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-05-05.
  • A few words on Ruby's type annotations state
    4 projects | news.ycombinator.com | 5 May 2023
    I had written a code contracts library for Ruby about 10 years ago [1]. I stopped working on it, mainly because it only provided runtime type checking, and I wanted static type checking. Nowadays my main language is typescript. I miss ruby, but can't give up the static typing that typescript provides. I really wish Ruby had a type system with the same level of support. VSCode has phenomenal TS support, and there's a community adding types to projects [2]. This is something I'd like for Ruby also.

    > An integral part of this informality is relying on Matz’s taste and intuition for everything that affects the language’s core.

    I think a more defined process would mean a better future for Ruby and Ruby developers.

    - [1] https://github.com/egonschiele/contracts.ruby

    - [2] https://github.com/DefinitelyTyped/DefinitelyTyped

  • Why I Stopped Using Sorbet in All My Ruby Projects
    7 projects | /r/ruby | 13 Apr 2023
    Contracts gem can be a nice middle-ground. It has a fairly readably syntax and only checks method inputs and outputs at runtime. We use it to annotate important core methods, while leaving the rest type-free.
  • Should gems support old Ruby versions like 2.4?
    1 project | /r/ruby | 22 Jun 2022
    For example contracts gem needs to have a separate version/branch for ruby 3.x due to the breaking change above
  • Cells - Introduction
    3 projects | dev.to | 12 Mar 2021
    This gives me access to input values as long as I defined them via attr_reader. Oh what's the Contract XXX above attr_reader? They are from contracts.ruby and completely optional and won't be explained in this post. You can safely ignore those and maybe study that gem later.

Rails style guide

Posts with mentions or reviews of Rails style guide. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-10-21.
  • Development guidelines
    3 projects | /r/developer | 21 Oct 2022
    As you see - there are no reference to any technology or framework. There are a lot of best-practices for almost any framework, so you can choose an appropriate one. For example - if you're a rails developer, then you can check https://github.com/rubocop/ruby-style-guide and https://github.com/rubocop/rails-style-guide but if you're a golang developer - https://github.com/uber-go/guide/blob/master/style.md and https://developers.mattermost.com/contribute/more-info/server/style-guide/
  • Beginner's Guide to RuboCop in Rails
    5 projects | dev.to | 18 Aug 2021
    Rails
  • Learning Ruby on Rails as an experienced programmer
    2 projects | /r/rails | 6 May 2021
    Couple of examples: ruby style guide, rails style guide
  • Why You Should Avoid Models in Rails Migrations
    1 project | /r/ruby | 13 Apr 2021
    A workaround proposed in Rails styleguide seems a good solution : https://rails.rubystyle.guide/#define-model-class-migrations

What are some alternatives?

When comparing contracts.ruby and Rails style guide you can also consider the following projects:

Fundamental Ruby - :books: Fundamental programming with ruby examples and references. It covers threads, SOLID principles, design patterns, data structures, algorithms. Books for reading. Repo for website https://github.com/khusnetdinov/betterdocs

Ruby style guide - A community-driven Ruby coding style guide

fast-ruby - :dash: Writing Fast Ruby :heart_eyes: -- Collect Common Ruby idioms.

RSpec style guide - RSpec Best Practices

Best-Ruby - Ruby Tricks, Idiomatic Ruby, Refactoring and Best Practices

Functional Ruby