You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
nodeのSocket.ioっぽい物のRuby版を作った。 https://github.com/shokai/sinatra-rocketio 依存 EventMachineが有効なWebサーバー(thinとか)と、jQueryが必要。 Rubyは1.8.7〜2.0.0まで動く。 Sinatraで使う インストール gem install sinatra-rocketio ブラウザとか回線に応じてWebSocketとCometの使える方が自動的に選ばれる。 切断されても定期的に再接続を試みるようになってる。 sinatraに読みこむだけで使える。sinatraのプロセス内にwebsocketサーバーも組み込まれる。 require 'sinatra' require 'sinatra/rocketio' modular styleではclass内でregisterすればok class
Dismiss Octotip: You've activated the file finder by pressing t Start typing to filter the file list. Use ↑ and ↓ to navigate, enter to view files.
◆ [Ruby][Sinatra] SinatraでRack::Csrfの例外をハンドリングする SinatraでのCSRF対策にはRack::Csrfが使えますが、普通に use Rack::Csrf, :raise => true とか書いただけでは、errorハンドラで例外を捕捉・処理できません。production環境ではCSRFチェックに引っかかると403応答+真っ白な画面になるのですが、false negativeの可能性が0ではないので、何らかの処理はしておきたいところです。 というわけで、試行錯誤の結果行き着いたのが以下のようなコード。もっと良い方法があったらコメントください。 require 'rubygems' require 'sinatra' require 'rack/csrf' require 'haml' use Rack::Session::Pool use
Rack-based interactive console (à la Rails console) in your web application's front-end Resources Example video Documentation Install In your Gemfile: gem 'rack-webconsole' Rack-webconsole needs JQuery. If you are using Rails 3, JQuery is loaded by default. In case you don't want to use JQuery in your application, rack-webconsole can inject it for you only when it needs it. To do that you should p
gyazo-sinatra gyazo-sinatra is a Gyazo server ported on Sinatra (The original server a.k.a upload.cgi written by Toshiyuki Masui.) Contributing to gyazo-sinatra Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it Fork the project Start a featu
Description¶ ↑ Tux dresses up sinatra in a shell. Use it to interact with your helpers, view rendering and your app’s response objects. Tux also gives you commands to view your app’s routes and settings. Install¶ ↑ Install the gem with: gem install tux Usage¶ ↑ Start with: $ tux If your app’s config file isn’t config.ru, specify with -c $ tux -c app.ru To interact with your helpers: >> app.my_help
rstat.us is a microblogging site built on top of the ostatus protocol. The differences between rstat.us and other microblogging networks are simplicity and openness. Simplicity is a core 'feature' of rstat.us. We pride ourselves on saying 'no' to lots of features. Our interface is clean, and easy to understand. We give you just enough features to be interesting, but not enough to be complicated an
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く