All Projects → waiting-for-dev → web_pipe

waiting-for-dev / web_pipe

Licence: other
One-way pipe, composable, rack application builder

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to web pipe

Controller
Complete, fast and testable actions for Rack and Hanami
Stars: ✭ 221 (+294.64%)
Mutual labels:  rack, controller
RockerView
A game controller view
Stars: ✭ 21 (-62.5%)
Mutual labels:  controller
helm-controller
A simple way to manage helm charts with a Custom Resource Definitions in k8s.
Stars: ✭ 49 (-12.5%)
Mutual labels:  controller
php-mvc
Mini framework para aplicaciones PHP con el patrón MVC
Stars: ✭ 35 (-37.5%)
Mutual labels:  controller
XB1ControllerBatteryIndicator
A tray application that shows a battery indicator for an Xbox-ish controller and gives a notification when the battery level drops to (almost) empty.
Stars: ✭ 536 (+857.14%)
Mutual labels:  controller
sinatra-api-server-toolbox
Sinatra API Server Toolbox (Ruby, Sinatra, ActiveRecord, postgreSQL, JSON, jQuery, AJAX)
Stars: ✭ 21 (-62.5%)
Mutual labels:  rack
encrypted cookie
AES-128 encrypted session cookies for Rack (and Sinatra and other frameworks).
Stars: ✭ 54 (-3.57%)
Mutual labels:  rack
thanos-receive-controller
Kubernetes controller to automatically configure Thanos receive hashrings
Stars: ✭ 55 (-1.79%)
Mutual labels:  controller
mpc
A software pipeline using the Model Predictive Control method to drive a car around a virtual track.
Stars: ✭ 119 (+112.5%)
Mutual labels:  controller
px
ps and top for human beings
Stars: ✭ 151 (+169.64%)
Mutual labels:  pipe
sbuscontroller
This Arduino-Sketch lets you connect your SBUS compatible radio wirelessly as controller to your pc.
Stars: ✭ 24 (-57.14%)
Mutual labels:  controller
MVVM-Design-Pattern-Demo
An Xcode 9 project written in Swift 4 code designed using the MVVM design pattern, truly extolling the virtues of MVVM over MVC.
Stars: ✭ 31 (-44.64%)
Mutual labels:  controller
Fairtris
Clone of the official classic Tetris® game for the NES console, intended for Windows and Linux systems. It implements the original mechanics and includes many regional versions and several RNGs (all in one executable).
Stars: ✭ 30 (-46.43%)
Mutual labels:  controller
Model-Predictive-Control
Udacity Self-Driving Car Engineer Nanodegree. Project: Model Predictive Control
Stars: ✭ 50 (-10.71%)
Mutual labels:  controller
Polyel-Framework
⚡️ Voltis Core: A PHP framework based on Swoole from the ground up
Stars: ✭ 22 (-60.71%)
Mutual labels:  controller
chpc
CHPC: Cheap Heat Pump Controller
Stars: ✭ 27 (-51.79%)
Mutual labels:  controller
kube-code-generator
Kubernetes code generator docker image
Stars: ✭ 60 (+7.14%)
Mutual labels:  controller
SPX-GC
SPX is a graphics control client for live video productions and live streams using CasparCG, OBS, vMix, or similar software.
Stars: ✭ 178 (+217.86%)
Mutual labels:  controller
ContainerView
Using Container View in iOS with Swift
Stars: ✭ 34 (-39.29%)
Mutual labels:  controller
droid controller
Control the parameters of an Android system with the power of Xposed framework. 通过Xposed框架控制Android参数。
Stars: ✭ 15 (-73.21%)
Mutual labels:  controller

Gem Version Build Status

WebPipe

web_pipe is a builder of composable rack applications through a pipe of functions on an immutable struct.

web_pipe plays incredibly well with hanami 2. If you want to create a hanami 2 app with web_pipe, you can take inspiration from this sample todo application:

https://github.com/waiting-for-dev/hanami_2_web_pipe_todo_app

  1. Introduction
  2. Design model
  3. Building a rack application
  4. Plugging operations
    1. Resolving operations
    2. Injecting operations
    3. Composing operations
    4. Inspecting operations
  5. Using rack middlewares
    1. Injecting middlewares
    2. Composing middlewares
    3. Inspecting middlewares
  6. Composing applications
  7. Connection struct
    1. Sharing data downstream
    2. Halting the pipe
    3. Configuring the connection struct
  8. Overriding instance methods
  9. DSL free usage
  10. Plugs
    1. Config
    2. ContentType
  11. Testing
  12. Extensions
    1. Container
    2. Cookies
    3. Flash
    4. Dry Schema
    5. Hanami View
    6. Not found
    7. Params
    8. Rails
    9. Redirect
    10. Router params
    11. Session
    12. URL
  13. Recipes
    1. hanami 2 & dry-rb integration
    2. hanami-router integration
    3. Using all RESTful methods
# config.ru
require 'web_pipe'

WebPipe.load_extensions(:params)

class HelloApp
  include WebPipe
  
  AUTHORIZED_USERS = %w[Alice Joe]
  
  plug :html
  plug :authorize
  plug :greet
  
  private
  
  def html(conn)
    conn.add_response_header('Content-Type', 'text/html')
  end
  
  def authorize(conn)
    user = conn.params['user']
    if AUTHORIZED_USERS.include?(user)
      conn.add(:user, user)
    else
      conn.
        set_status(401).
        set_response_body('<h1>Not authorized</h1>').
        halt
    end
  end
  
  def greet(conn)
    conn.set_response_body("<h1>Hello #{conn.fetch(:user)}</h1>")
  end
end

run HelloApp.new

Current status

web_pipe is in active development but ready to be used in any environment. Everyday needs are covered, and while you can expect some API changes, they won't be essential, and we'll document everything appropriately.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/waiting-for-dev/web_pipe.

Release Policy

web_pipe follows the principles of semantic versioning.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].