Ruby Rack

Open-source Ruby projects categorized as Rack

Top 23 Ruby Rack Projects

  • Sinatra

    Classy web-development dressed in a DSL (official / canonical repo)

    Project mention: Escaping all path info with Shellwords.escape in Sinatra | reddit.com/r/ruby | 2022-11-16
  • Puma

    A Ruby/Rack web server built for parallelism

    Project mention: puma 6.0 released | reddit.com/r/ruby | 2022-10-21

    Anyway I did it: https://github.com/puma/puma/issues/3003 It's quite more complicated: https://github.com/puma/puma/issues/2999 A fix is in progress: https://github.com/puma/puma/pull/3002

  • InfluxDB

    Build time-series-based applications quickly and at scale.. InfluxDB is the Time Series Data Platform where developers build real-time applications for analytics, IoT and cloud-native services in less time with less code.

  • Rack::Attack

    Rack middleware for blocking & throttling

    Project mention: Rack-attack gem setup to protect Rails and Rack apps from bad clients | dev.to | 2022-08-08

    Rack middleware for blocking & throttling abusive requests. Protect your Rails and Rack apps from bad clients. Rack::Attack lets you quickly decide when to allow, block, and throttle based on the properties of the request. Using this gem you can save your web application from attacks, we can whitelist IPs, Block requests according to requirements, and many more… Install Rack-attack gem: # In your Gemfile gem 'rack-attack' Enter fullscreen mode Exit fullscreen mode Plugging into the application Then tell your ruby web application to use rack-attack as a middleware. # config/application.rb # rack attack middleware config.middleware.use Rack::Attack Enter fullscreen mode Exit fullscreen mode Once you’ve done that, you’ll need to configure it. You can do this by creating the file, config/initializers/rack-attack.rband adding the rules to fit your needs. You can disable it permanently (like for a specific environment) or temporarily (can be helpful for specific test cases) by writing: Usage Safe listing Safelists have the most precedence, so any request matching a safelist would be allowed despite matching any number of blocklists or throttles. safelist_ip(ip_address_string) Rack::Attack.safelist_ip(“5.6.7.8”) Enter fullscreen mode Exit fullscreen mode safelist_ip(ip_subnet_string) Rack::Attack.safelist_ip(“5.6.7.0/24”) Enter fullscreen mode Exit fullscreen mode safelist(name, &block) Name your custom safelist and make your ruby-block argument return a truthy value if you want the request to be allowed, and false otherwise. Blocking blocklist_ip(ip_address_string) Rack::Attack.blocklist_ip(“1.2.3.4”) Enter fullscreen mode Exit fullscreen mode blocklist_ip(ip_subnet_string) Rack::Attack.blocklist_ip(“1.2.0.0/16”) Enter fullscreen mode Exit fullscreen mode blocklist(name, &block) Name your custom blocklist and make your ruby-block argument return a truthy value if you want the request to be blocked, and false otherwise. Throttling *throttle(name, options, &block) *( provide limit and period as options) Throttle state is stored in a configurable cache (which defaults to Rails.cache if present). Name your custom throttle, provide limit and period as options, and make your ruby-block argument return the discriminator. This discriminator is how you tell rack-attack whether you’re limiting per IP address, per user email, or any other. For example, if we want to restrict requests other than defined routes and display a custom error page. Error page: If we want to restrict requests/IP and if the request limit increases then send a reminder mail. For Example, we want to allow only 300 requests per 30 seconds after that will restrict requests from this IP till the next 30 seconds interval starting. Get error mail if the limit is extended. Performance The overhead of running Rack::Attack is typically negligible (a few milliseconds per request), but it depends on how many checks you’ve configured, and how long they take. Throttles usually require a network roundtrip to your cache server(s), so try to keep the number of throttle checks per request low. If a request is blocklisted or throttled, the response is a very simple Rack response. A single typical ruby web server thread can block several hundred requests per second. Sample rack-attack.rb file For more information: https://github.com/rack/rack-attack If this guide has been helpful to you and your team please share it with others!

  • Rack

    A modular Ruby web server interface.

    Project mention: Rack 3 Upgrade Guide | news.ycombinator.com | 2022-10-22
  • Shrine

    File Attachment toolkit for Ruby applications

  • SecureHeaders

    Manages application of security headers with many safe defaults

  • Split

    :chart_with_upwards_trend: The Rack Based A/B testing framework (by splitrb)

  • SonarQube

    Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.

  • Thin

    A very fast & simple Ruby web server

    Project mention: Newb here: have you written your own web server? Seeking advice | reddit.com/r/ruby | 2022-06-18

    The other major thing you'll run into is performance. WEBrick's HTTP parsing code may look hairy but it is fast. Mongrel was the first Ruby HTTP server to implement it's HTTP parser in C using Ragel, which Thin, Unicorn, and Puma all copied; although there's a bug in the original Mongrel HTTP parser where it does not combine the values duplicate HTTP headers (yes, HTTP Header names can actually be repeated).

  • Cuba

    Rum based microframework for web development.

    Project mention: What Would It Take for Roda to Win? | reddit.com/r/ruby | 2022-06-08

    To anyone here who enjoys and values the things Roda is good at: I would recommend you also take a look at Cuba, the project Roda is forked from.

  • rack-throttle

    Rack middleware for rate-limiting incoming HTTP requests.

  • vite_ruby

    ⚡️ Vite.js in Ruby, bringing joy to your JavaScript experience

    Project mention: Setting up Svelte with Rails? | reddit.com/r/rails | 2022-11-12

    Use vite with https://vite-ruby.netlify.app/ if you don’t go the inertia route.

  • Rack::Tracker

    Tracking made easy: Don’t fool around with adding tracking and analytics partials to your app and concentrate on the things that matter.

  • lamby

    Simple Rails & AWS Lambda Integration 🐑🛤

    Project mention: How to make your RoR app infinitely scale? | reddit.com/r/rubyonrails | 2022-07-24

    In any case you can try out https://github.com/customink/lamby which is a gem responsible to allow to run a ror app native on aws lambda.

  • client_ruby

    Prometheus instrumentation library for Ruby applications

    Project mention: Some initial impulse help to integrate Prometheus in my Rails app? | reddit.com/r/rails | 2021-12-26
  • rack-app

    minimalist framework for building rack applications

  • Plezi

    Plezi - the Ruby framework for realtime web-apps, websockets and RESTful HTTP

  • controller

    Complete, fast and testable actions for Rack and Hanami (by hanami)

    Project mention: Utilizando o padrão interactor no Ruby on Rails | dev.to | 2022-03-20

    Hanami::Controller - Full featured, fast and testable actions for Rack

  • Bugsnag

    Bugsnag error monitoring & reporting software for rails, sinatra, rack and ruby

  • tipi

    Tipi - the All-in-one Web Server for Ruby Apps

  • capybara_discoball

    Spin up an external server just for Capybara

    Project mention: Testing Dependencies: Fake It While You Make It | dev.to | 2022-06-05

    We can use the FakeWeather API rather than the real one using a tool like capybara_discoball.

  • rack-freeze

    A policy framework for implementing thread-safe rack middleware.

  • web_pipe

    One-way pipe, composable, rack application builder

    Project mention: Catching up on things | reddit.com/r/ruby | 2021-12-19

    Better gems. dry-rb, ROM, and Hanami are doing interesting stuff. I also hear web_pipe is popular?

  • worker_killer

    [MIRROR] Kill any workers by memory and request counts or take custom reaction

  • Scout APM

    Truly a developer’s best friend. Scout APM is great for developers who want to find and fix performance issues in their applications. With Scout, we'll take care of the bugs so you can focus on building great things 🚀.

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2022-11-16.

Ruby Rack related posts

Index

What are some of the best open-source Rack projects in Ruby? This list will help you:

Project Stars
1 Sinatra 11,773
2 Puma 7,253
3 Rack::Attack 5,221
4 Rack 4,559
5 Shrine 3,025
6 SecureHeaders 3,014
7 Split 2,599
8 Thin 2,205
9 Cuba 1,407
10 rack-throttle 934
11 vite_ruby 791
12 Rack::Tracker 625
13 lamby 468
14 client_ruby 449
15 rack-app 403
16 Plezi 246
17 controller 240
18 Bugsnag 229
19 tipi 205
20 capybara_discoball 127
21 rack-freeze 118
22 web_pipe 56
23 worker_killer 8
Delete the most useless function ever: context switching.
Zigi monitors Jira and GitHub updates, pings you when PRs need approval and lets you take fast actions - all directly from Slack! Plus it reduces cycle time by up to 75%.
www.zigi.ai