Pretender is a mock server library for XMLHttpRequest and Fetch, that comes with an express/sinatra style syntax for defining routes and their handlers.
Serverless Rack Plugin
Asciidoctor extension that adds support for callouts added outside the listing block.
Quickly find the latest version of a package in npm.
Resolve a URI relative to an optional base URI
A message bus client in Javascript
Standalone cryptographic library. A minimalist port of cryptojs javascript library to node.js, that supports AES symmetric key cryptography. node-cryptojs-aes works great on frontend data masking and unmasking.
TypeScript definitions for dom-inputevent
Federated Wiki - Client-side Javascript
An HTTP(s) proxy `http.Agent` implementation for HTTPS
A simple common HTTP client specifically for Google APIs and services.
parse argument options
Toggle current selected content in browser
Native Abstractions for Node.js: C++ header for Node 0.8 -> 26 compatibility
A Yeoman generator for AngularJS + Sinatra
A living styleguide and pattern library by uSwitch.
The core `url` packaged standalone for use with Browserify.
Offers getProxyForUrl to get the proxy URL for a URL, respecting the *_PROXY (e.g. HTTP_PROXY) and NO_PROXY environment variables.
Require global variables
A Node.js module for sending notifications on native Mac, Windows (post and pre 8) and Linux (or Growl as fallback)
Minimal Sinatra like router for your Web browser
JSON.parse with context information on error
Standard Subresource Integrity library -- parses, serializes, generates, and verifies integrity metadata according to the SRI spec.
Pure Rip API framework — elegant, fast, zero dependencies
This is a simple example I built while playing with Sinatra and Cucumber a bit, so that I could get to a good starting point.
The example gem created for a lightning talk on sinatra tools at Rubyconf 2009
Sinatra runtime and testing extensions used commonly by Thumblemonks. For example, :json_response, which turns an object into JSON and sets the content-type appropriately.
Provides various specific implementations based on the Shield protocol. Examples include a drop-in Sinatra Extension, an Ohm specific model, and a Sequel specific model.
Belphanior-servant is a library for creating servants using Sinatra. It is a prerequesite for all such servants. For an example of the basics of a servant, consult the examples/empty.rb file or view the servants posted to GitHub (http://github.com/fixermark).
A Rack middleware that parses the POST or PUT body for JSON or XML content to a Hash and puts it into the rack.request.form_hash. Most frameworks get the params hash from there. Uses ActiveSupport and the respective parsers for parsing. So you can set it up to use Nokogiri and YajL. Useful for example when writing JSON and XML API apps with Sinatra or Padrino.
A Rack middleware that transforms async requests (using thin + async_sinatra for example) into synchronous requests. Useful for testing Async Sinatra apps with a minimum of changes in your testing environment.
This gem provides a convenient way for a developer to quickly get to a merchant's data Add your app ID and secret, update your callback location in the Square Developer Portal and off you go. Based on Square's sinatra examples, https://github.com/square/connect-api-examples
= sinatra-mongo Extends Sinatra with an extension method for dealing with monogodb using the ruby driver. Install it with gem: $ gem install sinatra-mongo Now we can use it an example application. require 'sinatra' require 'sinatra/mongo' # Specify the database to use. Defaults to mongo://localhost:27017/default, # so you will almost definitely want to change this. # # Alternatively, you can specify the MONGO_URL as an environment variable set :mongo, 'mongo://localhost:27017/sinatra-mongo-example' # At this point, you can access the Mongo::Database object using the 'mongo' helper: puts mongo["testCollection"].insert {"name" => "MongoDB", "type" => "database", "count" => 1, "info" => {"x" => 203, "y" => '102'}} get '/' do mongo["testCollection"].find_one end If you need to use authentication, you can specify this in the mongo uri: set :mongo, 'mongo://myuser:mypass@localhost:27017/sinatra-mongo-example' == Mongo Reference * http://www.mongodb.org/display/DOCS/Ruby+Tutorial == Note on Patches/Pull Requests * Fork the project. * Make your feature addition or bug fix. * Add tests for it. This is important so I don't break it in a future version unintentionally. * Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull) * Send me a pull request. Bonus points for topic branches. == Copyright Copyright (c) 2009 Joshua Nichols. See LICENSE for details.
= sinatra-mongo Extends Sinatra with an extension method for dealing with monogodb using the ruby driver. Install it with gem: $ gem install sinatra-mongo Now we can use it an example application. require 'sinatra' require 'sinatra/mongo' # Specify the database to use. Defaults to mongo://localhost:27017/default, # so you will almost definitely want to change this. # # Alternatively, you can specify the MONGO_URL as an environment variable set :mongo, 'mongo://localhost:27017/sinatra-mongo-example' # At this point, you can access the Mongo::Database object using the 'mongo' helper: puts mongo["testCollection"].insert {"name" => "MongoDB", "type" => "database", "count" => 1, "info" => {"x" => 203, "y" => '102'}} get '/' do mongo["testCollection"].find_one end If you need to use authentication, you can specify this in the mongo uri: set :mongo, 'mongo://myuser:mypass@localhost:27017/sinatra-mongo-example' == Mongo Reference * http://www.mongodb.org/display/DOCS/Ruby+Tutorial == Note on Patches/Pull Requests * Fork the project. * Make your feature addition or bug fix. * Add tests for it. This is important so I don't break it in a future version unintentionally. * Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull) * Send me a pull request. Bonus points for topic branches. == Copyright Copyright (c) 2009 Joshua Nichols. See LICENSE for details.
Nyaplot is an Interactive plots generator based on Web technology like SVG, WebGL, and JavaScript. It enables us to create interactive plots interactively on IRuby notebook, a web-based Ruby environment. Nyaplot is totally web-based gem and plots can be embedded into Rails or Sinatra seemlesly. Supported charts include basic 2D plot, 3D plot, Map plot and plot for Biology. See nbviewer (http://nbviewer.ipython.org/github/domitry/nyaplot/blob/master/examples/notebook/Index.ipynb) to overview what plots can be created with nyaplot and how to do it.
# Rack HTTP Pipe Use to pipe directly a remote HTTP file without buffering it. > /!\ Do not work with WebBrick, tested with puma ## Use case * Given a file named #HASH#.pdf on S3 * You want a clean URL and handling the authentication in front of it ``` GET http:/example.com/download Content-Disposition: attachment;filename=name-fetched-from-db.pdf Content-Length Content-Type etc. ``` ## Usage ```ruby get "/" do http_pipe "http://example.com/iso-ubuntu-1404-64bits", { status: 200, headers: { "Content-Type: application/octet-stream", "Content-Disposition: attachment;filename=ubuntu.iso", } } end ``` See the example directory for an example app using sinatra