ruby-request_store: Import ruby-request_store-1.5.0 as wip/ruby-request_store

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...
This commit is contained in:
Atsushi Toyokura 2020-02-01 22:01:02 +09:00
parent 38fbd2751a
commit f61572ffd5
5 changed files with 54 additions and 0 deletions

View File

@ -4371,6 +4371,7 @@ SUBDIR+= ruby-rack-flash3
SUBDIR+= ruby-rack-protection1
SUBDIR+= ruby-rake-compiler
SUBDIR+= ruby-redmine
SUBDIR+= ruby-request_store
SUBDIR+= ruby-review
SUBDIR+= ruby-rinku
SUBDIR+= ruby-roo-xls

12
ruby-request_store/DESCR Normal file
View File

@ -0,0 +1,12 @@
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...

View File

@ -0,0 +1,16 @@
# $NetBSD$
DISTNAME= request_store-1.5.0
CATEGORIES= devel
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://github.com/steveklabnik/request_store
COMMENT= Per-request global storage for Rack
LICENSE= mit
DEPENDS+= ${RUBY_PKGPREFIX}-rack>=1.4:../../www/ruby-rack
USE_LANGUAGES= # none
.include "../../lang/ruby/gem.mk"
.include "../../mk/bsd.pkg.mk"

19
ruby-request_store/PLIST Normal file
View File

@ -0,0 +1,19 @@
@comment $NetBSD$
${GEM_HOME}/cache/${GEM_NAME}.gem
${GEM_LIBDIR}/.gitignore
${GEM_LIBDIR}/.travis.yml
${GEM_LIBDIR}/Gemfile
${GEM_LIBDIR}/LICENSE.txt
${GEM_LIBDIR}/README.md
${GEM_LIBDIR}/Rakefile
${GEM_LIBDIR}/lib/request_store.rb
${GEM_LIBDIR}/lib/request_store/middleware.rb
${GEM_LIBDIR}/lib/request_store/railtie.rb
${GEM_LIBDIR}/lib/request_store/version.rb
${GEM_LIBDIR}/request_store.gemspec
${GEM_LIBDIR}/test/middleware_test.rb
${GEM_LIBDIR}/test/request_store_test.rb
${GEM_LIBDIR}/test/test_helper.rb
${GEM_HOME}/specifications/${GEM_NAME}.gemspec
@pkgdir lib/ruby/gems/2.6.0/extensions
@pkgdir lib/ruby/gems/2.6.0/build_info

View File

@ -0,0 +1,6 @@
$NetBSD$
SHA1 (request_store-1.5.0.gem) = 885c89acee5d7ee49804085090ff91d79babac8a
RMD160 (request_store-1.5.0.gem) = d93bbff6e4f84f0f4ff5c1af794ce16bec109888
SHA512 (request_store-1.5.0.gem) = c01d4505d2bc0b88456d0bc49416fcbea67da1e2ab6ef0c7fc900fae8856d82157dc39d2e1d2f299000f74b140f6f13d7352f4684e247d103bbaab7b1705910f
Size (request_store-1.5.0.gem) = 9216 bytes