Giter Club home page Giter Club logo

gem-rbs's Introduction

gem-rbs

Collection of RBS definitions for gems we use, meant to be incorporated with Steep through rbs collection. Similar to ruby/gem_rbs_collection, this contains generated type definitions for third party gems. This is meant to be used in conjuction with ruby/gem_rbs_collection, so it only adds additional definitions not already defined there.

Adding these types for use in another library

Add the following to your rbs_collection configuration file:

sources:
  # ... your other sources
  - name: Shelf-Life/gem-rbs
    remote: https://github.com/Shelf-Life/gem-rbs.git
    revision: main
    repo_dir: gems

Run rbs collection update and you should be good to go. If you haven't configured rbs collection, see the instructions here.

Adding/updating new definitions to this library

Fork/create a new branch. If adding a new gem (or definitions for a new version), create the appropriate folders in gems:

mkdir ./gems/gem-name && mkdir ./gems/gem-name/1.2

Version folders should only use major/minor revisions.

Once you have created the folders, run rbs prototype for the library you wish to generate:

rbs prototype rb path/to/gem-source-location/gem-name-1.2/lib/**/*.rb > path/to/this/repo/gems/gem-name/1.2/gem-name-generated.rbs

Push your changes to GitHub. Using another project relying on this for your gems, update the rbs_collection configuration to point to your fork/branch of this repo instead of main, and run rbs collection update. Iterate on your definitions until steep check passes (rbs prototype does not always generate completely correct definitions).

Once you are finished, create a pull request to merge your changes back to main.

gem-rbs's People

Contributors

clinejj avatar

Watchers

Anna Goldberg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.