knuton / stubb Goto Github PK
View Code? Open in Web Editor NEWSpecify REST API stubs using your file system.
License: MIT License
Specify REST API stubs using your file system.
License: MIT License
To increase the range of scenarios second mate can be used in, it should be possible to write response files as ERB (or similar) to put GET or POST params back in the response.
Second Mate should print the path of the response file used when serving a request.
It would be interesting to add a stop command to stubb to ... stop the server.
One use-case would be launching the server in integration tests scenarios and shutdown it at the end
Second Mate should reset the request count on receiving a SIGINT and quit only after two consecutive SIGINTs.
Stub sets can be managed in a directory unrelated to Stubb using a VCS like Git (branches for sets, commits for undoable temporary changes).
For each combination of request path, method and accept header, there needs to be a separate count.
Hi,
Cool stuff.
My env: Win7 x64 Ruby 1.9.3 Stubb 0.1.3
curl http://localhost:4040/hello-world
::1 - - [23/Jul/2013 17:21:17] "GET /hello-world HTTP/1.1" 200 6 0.0080 "D:/project/services/hello-world.GET" "YAML Frontmatter: No"
DEV64.AD.LAN.NET - - [23/Jul/2013:17:21:17 Paris, Madrid (heure d??t?)] "GET /hello-world HTTP/1.1" 200 6
from browser
::1 - - [23/Jul/2013 17:21:25] "GET /hello-world HTTP/1.1" 404 - 0.0070 "NONE" "YAML Frontmatter: No"
DEV64.AD.LAN.NET - - [23/Jul/2013:17:21:25 Paris, Madrid (heure d??t?)] "GET /hello-world HTTP/1.1" 404 10
PS:
Works from the Poster Chrome extension
Add mode that allows "autofilling" of response files by proxying through to real API if response file is missing.
Should be done as additional Rack middleware to prevent complicating core functionality. If response comes back as 404, autofill app tries real API and persists response if any.
Hi,
I've followed the instructions for your hello world example, and am getting the following error:
!! Unexpected error while processing request: undefined method `each' for "Stubb::NoMatch":String
127.0.0.1 - - [20/Sep/2012 07:24:41] "GET /hello-world HTTP/1.1" 404 - 0.0117 "NONE" "YAML Frontmatter: No"
Am i missing something? I'm using ruby 1.9.3.
Our team found it useful to have the ability for the stubb server to assert parameters with a particular name existed--in many casses, we find this as important as a request having the correct path. We made some small edits to create this feature.
I'm not sure if this is within the scope of what you intend stubb to do, but I wanted to ask if you would like to merge in the changes. They are here:
https://github.com/kortina/stubb/commit/a3f64c468f20ad2c2302a1a4f04f145de804146d
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.