compiles binaries to Linux, OS X, and Windows." mrubyでCLIを作る為のボイラープレート 複数プラットフォーム向けのバイナリが作成出来る クロスコンパイル用のDockerイメージが提供されており Docker上でビルドを行う mruby-cli mruby-cli
result = AccessController.new.call({"REMOTE_ADDR" => "172.17.0.1"}) assert_equal [399, {}, []], result end def test_access_forbidden result = AccessController.new.call({"REMOTE_ADDR" => "127.0.0.1"}) assert_equal [403, {'content-type' => 'text/plain'}, ["access forbidden\n"]], result end end
redis.connect cached = redis.get(postcode.to_s).join if cached.nil? url = "https://postcode-jp.appspot.com/api/postcode? general=true&office=false&postcode=#{postcode}" status, _, body = http_request(url).join cached = body.join if status == 200 redis.set(postcode, cached.to_s).join end end cached end https://github.com/y-yagi/h2o-mruby- server/blob/master/scripts/addresser.rb
they became with H2O/mruby and the future of HTTP https://speakerdeck.com/udzura/haconiwa-and-future-os https://www.slideshare.net/ichitonagata/h2o-x-mruby- 72949986 https://www.slideshare.net/ichitonagata/how- happy-they-became-with-h2omruby-and-the-future-of- http