-
Notifications
You must be signed in to change notification settings - Fork 108
What is DuckRails?
DuckRails is an open source development tool built using the Ruby on Rails framework.
The purpose of the tool is to allow developers to easily mock API endpoints outside their applications.
If you deal with API endpoints and you need to mock some of them for any reason, yes.
Knowing ruby is not required. It would just help you define ruby dynamic mocks easier (embedded ruby). No worries, you can still define dynamic responses by selecting Javascript as the mock’s body type.
Instead of defining a mock to always respond with some static content, you can also configure it to dynamically resolve the content to serve. For example, you can access the original request’s parameters and headers and decide how you could respond. You can see how to create dynamic mocks with Embedded Ruby here and with Javascript here.
Some reasons:
- They might be unavailable
- You need functionality that hasn’t been implemented yet
- You can’t access them in the development environment
Suppose you want to develop a new feature in your web application but the backend API is not yet ready to serve the feature. You can mock the new endpoints and set your application to consume DuckRails endpoints instead of the real ones.
- DuckRails - 2017 Wiki pages.
- Feel free to request for documentation that you believe is missing by opening issues with the label
wiki