BSD Ports

www/ruby-request_store 1.5.1 NetBSD

Per-request global storage for Rack

System
NetBSD
Repository
pkgsrc
Maintainer
[email protected]
License
mit
Categories
www, ruby
Package size
16.0 KiB, 31.1 KiB installed

Description

Ever needed to use a global variable in Rails? Ugh, that's the worst. If youq need global state, you've probably reached for Thread.current. Like this:

def self.foo
  Thread.current\[:foo\] \|\|= 0
end

def self.foo=(value)
  Thread.current\[:foo\] = value
end

Ugh! I hate it. But you gotta do what you gotta do...

Install

Binary package:

pkgin install ruby33-request_store

From pkgsrc:

cd /usr/pkgsrc/www/ruby-request_store && make install clean

Dependencies

Run dependencies 2

No port depends on this one.

Configuration

No options to configure.

Service scripts
none
Flavors
ruby34-request_store-1.5.1, ruby40-request_store-1.5.1