diff --git a/Makefile b/Makefile index 5496fb5aa8..8df5ab640f 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/ruby-request_store/DESCR b/ruby-request_store/DESCR new file mode 100644 index 0000000000..4268b24d56 --- /dev/null +++ b/ruby-request_store/DESCR @@ -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... diff --git a/ruby-request_store/Makefile b/ruby-request_store/Makefile new file mode 100644 index 0000000000..a1906969a9 --- /dev/null +++ b/ruby-request_store/Makefile @@ -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" diff --git a/ruby-request_store/PLIST b/ruby-request_store/PLIST new file mode 100644 index 0000000000..4f6dfc1715 --- /dev/null +++ b/ruby-request_store/PLIST @@ -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 diff --git a/ruby-request_store/distinfo b/ruby-request_store/distinfo new file mode 100644 index 0000000000..41022ce30b --- /dev/null +++ b/ruby-request_store/distinfo @@ -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