https://github.com/sendgrid/uptyped
https://github.com/sendgrid/uptyped
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sendgrid/uptyped
- Owner: sendgrid
- License: mit
- Created: 2014-09-16T23:22:45.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2023-04-10T00:29:12.000Z (almost 3 years ago)
- Last Synced: 2025-09-05T23:58:18.999Z (7 months ago)
- Language: Ruby
- Size: 11.7 KB
- Stars: 7
- Watchers: 194
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
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