An open API service indexing awesome lists of open source software.

https://github.com/sendgrid/uptyped


https://github.com/sendgrid/uptyped

Last synced: 6 months ago
JSON representation

Awesome Lists containing this project

README

          

# Uptyped

This gem enforces interface matching. When configured, any class that inherits
from something other than Object will have tests added to make sure that the public
class and instance methods match the parent class for naming and arity. This is done
through testing so that there is no need for running unnecessary code during production.

Please only use inheritance when it is truly appropriate.

## Installation

Add this line to your application's Gemfile:

gem 'uptyped'

And then execute:

$ bundle

Or install it yourself as:

$ gem install uptyped

## Usage

```ruby
require 'uptyped'

RSpec.configure do |config|
config.include Uptyped::InheritedInterface
end
```

## ToDo

~~• Come up with a new name.~~

• Improve configuration

• Allow for white-listing of classes/namespaces?

## Contributing

1. Fork it ( https://github.com/sendgrid/uptyped/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request