sinatrarb.com Archives - 23 April 2014, Wednesday

  • README (Japanese)

    sinatrarb.com 14 Apr '14, 12am

    This page is also available in

  • Frequently Asked Questions

    sinatrarb.com 17 Mar '14, 11pm

    How do I make my Sinatra app reload on changes? What are my deployment options? How do I use sessions? How do I use session-based flash? Can I run Sinatra under Ruby 1.9? How do I get the “route” for the current page? How do I access helpers from within my views? How do I render parti...

  • README

    sinatrarb.com 29 Dec '13, 6pm

    List of locals passed to the document. Handy with partials. Example: erb "<%= foo %>", :locals => {:foo => "bar"} default_encoding String encoding to use if uncertain. Defaults to settings.default_encoding . views Views folder to load templates from. Defaults to settings.views . layou...

  • README

    sinatrarb.com 15 Dec '13, 7pm

    List of locals passed to the document. Handy with partials. Example: erb "<%= foo %>", :locals => {:foo => "bar"} default_encoding String encoding to use if uncertain. Defaults to settings.default_encoding . views Views folder to load templates from. Defaults to settings.views . layou...

  • README

    sinatrarb.com 04 Dec '13, 2pm

    List of locals passed to the document. Handy with partials. Example: erb "<%= foo %>", :locals => {:foo => "bar"} default_encoding String encoding to use if uncertain. Defaults to settings.default_encoding . views Views folder to load templates from. Defaults to settings.views . layou...

  • Frequently Asked Questions

    sinatrarb.com 17 Nov '13, 8am

    How do I make my Sinatra app reload on changes? What are my deployment options? How do I use sessions? How do I use session-based flash? Can I run Sinatra under Ruby 1.9? How do I get the “route” for the current page? How do I access helpers from within my views? How do I render parti...

  • About

    sinatrarb.com 11 Oct '13, 7pm

    Ryan Tomayko (rtomayko) for constantly fixing whitespace errors 60d5006 Ezra Zygmuntowicz (ezmobius) for initial help and letting Blake steal some of merbs internal code. Chris Schneider (cschneid) for The Book, the blog, irclogger.com , and a bunch of useful patches. Markus Prinz (cy...

  • README (Japanese)

    sinatrarb.com 08 Oct '13, 4am

    # アプリケーションが http://example.com/example で動作している場合 get '/foo' do request.body # クライアントによって送信されたリクエストボディ(下記参照) request.scheme # "http" request.script_name # "/example" request.path_info # "/foo" request.port # 80 request.request_method # "GET" request.query_string # "" request.content_le...

  • Configuring Settings

    sinatrarb.com 17 Aug '13, 2pm

    Sinatra includes a number of built-in settings that control whether certain features are enabled. Settings are application-level variables that are modified using one of the set , enable , or disable methods and are available within the request context via the settings object. Applica...

    Related:
    1. Sinatra and only Sinatra! rubylearning.org 19 Aug '13, 2am
  • README

    sinatrarb.com 15 Jun '13, 11pm

    List of locals passed to the document. Handy with partials. Example: erb "<%= foo %>", :locals => {:foo => "bar"} default_encoding String encoding to use if uncertain. Defaults to settings.default_encoding . views Views folder to load templates from. Defaults to settings.views . layou...

  • The Blog

    sinatrarb.com 04 Jun '13, 12am

    There are a lot of Sinatra extensions out there, and some of those are used by a large number of apps, like sinatra-content-for or sinatra-reloader. The maintainers of these extensions have to keep up with new Sinatra releases to make sure everything works fine. This poses an issue fr...

  • in The Wild

    sinatrarb.com 26 May '13, 2pm

    Sinatra::SimpleNavigation Easy creation of navigations (with multiple levels) with sinatra and the simple-navigation gem sinatra_more Library with agnostic generators, form builders, named route mappings, easy mailer support, and more. Sinatra’s Hat Mount models as web services in Sin...

  • Sinatra::Namespace (part of Sinatra::Contrib)

    sinatrarb.com 12 May '13, 4pm

    This extension is part of the Sinatra::Contrib project. Run gem install sinatra-contrib to have it available. Sinatra::Namespace Sinatra::Namespace is an extension that adds namespaces to an application. This namespaces will allow you to share a path prefix for the routes within the n...

  • Sinatra::Reloader (part of Sinatra::Contrib)

    sinatrarb.com 25 Apr '13, 7am

    This extension is part of the Sinatra::Contrib project. Run gem install sinatra-contrib to have it available. Sinatra::Reloader Extension to reload modified files. Useful during development, since it will automatically require files defining routes, filters, error handlers and inline ...

  • Sinatra::JSON (part of Sinatra::Contrib)

    sinatrarb.com 25 Apr '13, 7am

    This extension is part of the Sinatra::Contrib project. Run gem install sinatra-contrib to have it available. Sinatra::JSON Sinatra::JSON adds a helper method, called json , for (obviously) json generation. Usage Classic Application In a classic application simply require the helper, ...

  • New feature release, Contrib and Recipes

    sinatrarb.com 22 Apr '13, 7pm

    New feature release, Contrib and Recipes By Konstantin Haase on Friday, September 30, 2011 We’re proud to announce two new releases today: 1.3.0 and 1.2.7. We’re also simultaneously releasing sinatra-contrib and would like to officially announce the recently launched Sinatra Recipes p...

  • README

    sinatrarb.com 18 Apr '13, 9am

    List of locals passed to the document. Handy with partials. Example: erb "<%= foo %>", :locals => {:foo => "bar"} default_encoding String encoding to use if uncertain. Defaults to settings.default_encoding . views Views folder to load templates from. Defaults to settings.views . layou...

  • Frequently Asked Questions

    sinatrarb.com 23 Mar '13, 10am

    To use ActiveRecord’s migrations with Sinatra (or other non-Rails project), add the following to your Rakefile: namespace :db do desc "Migrate the database" task(:migrate => :environment) do ActiveRecord::Base.logger = Logger.new(STDOUT) ActiveRecord::Migration.verbose = true ActiveRe...

  • 1.4.0, 1.3.6, 1.2.9 released!

    sinatrarb.com 16 Mar '13, 2am

    Sinatra 1.4.0, 1.3.6, 1.2.9 released! By Konstantin Haase on Friday, March 15, 2013 I’ve just released Sinatra 1.4.0, 1.3.6 and 1.2.9. Find out what’s new in 1.4 on my blog .

  • Testing Sinatra with Rack::Test

    sinatrarb.com 09 Sep '12, 12pm

    require 'hello_world' require 'test/unit' require 'rack/test' set :environment, :test class HelloWorldTest < Test::Unit::TestCase def test_it_says_hello_world browser = Rack::Test::Session.new(Rack::MockSession.new(Sinatra::Application)) browser.get '/' assert browser.last_response.ok...

  • README

    sinatrarb.com 18 Jul '12, 1am

    # app running on http://example.com/example get '/foo' do t = %w[text/css text/html application/javascript] request.accept # ['text/html', '*/*'] request.accept? 'text/xml' # true request.preferred_type(t) # 'text/html' request.body # request body sent by the client (see below) reques...

  • README

    sinatrarb.com 06 Jul '12, 9pm

    # app running on http://example.com/example get '/foo' do t = %w[text/css text/html application/javascript] request.accept # ['text/html', '*/*'] request.accept? 'text/xml' # true request.preferred_type(t) # 'text/html' request.body # request body sent by the client (see below) reques...

  • README (Japanese)

    sinatrarb.com 20 Jun '12, 3pm

    # アプリケーションが http://example.com/example で動作している場合 get '/foo' do request.body # クライアントによって送信されたリクエストボディ(下記参照) request.scheme # "http" request.script_name # "/example" request.path_info # "/foo" request.port # 80 request.request_method # "GET" request.query_string # "" request.content_le...

  • Writing Extensions

    sinatrarb.com 07 Jun '12, 12pm

    The “Classic” style, where applications are defined on main / the top-level – most of the examples and documentation target this usage. Classic applications are often single-file, standalone apps that are run directly from the command line or with a minimal rackup file. When an extens...

  • Sinatra

    sinatrarb.com 29 May '12, 6pm

    README Documentation Contribute Code Crew About Sinatra require 'sinatra' get '/hi' do "Hello World!" end Put this in your pipe $ gem install sinatra $ ruby -rubygems hi.rb == Sinatra has taken the stage ... >> Listening on 0.0.0.0:4567 and smoke it

  • Frequently Asked Questions

    sinatrarb.com 27 May '12, 8am

    What happened to reloading in Sinatra 0.9.2? What are my deployment options? How do I use sessions? How do I use session-based flash? Can I run Sinatra under Ruby 1.9? How do I get the “route” for the current page? How do I access helpers from within my views? How do I render partials...

    Related:
    1. Sinatra Book sinatra-book.gittr.com 26 May '12, 9am
  • README (Chinese)

    sinatrarb.com 25 May '12, 4am

    # 在 http://example.com/example 上运行的应用 get '/foo' do request.body # 被客户端设定的请求体(见下) request.scheme # "http" request.script_name # "/example" request.path_info # "/foo" request.port # 80 request.request_method # "GET" request.query_string # "" request.content_length # request.body的长度 req...

    Related:
    1. Sinatra Book sinatra-book.gittr.com 26 May '12, 9am
  • README

    sinatrarb.com 15 May '12, 8pm

    # app running on http://example.com/example get '/foo' do t = %w[text/css text/html application/javascript] request.accept # ['text/html', '*/*'] request.accept? 'text/xml' # true request.preferred_type(t) # 'text/html' request.body # request body sent by the client (see below) reques...

  • README

    sinatrarb.com 02 May '12, 2pm

    # app running on http://example.com/example get '/foo' do t = %w[text/css text/html application/javascript] request.accept # ['text/html', '*/*'] request.accept? 'text/xml' # true request.preferred_type(t) # 'text/html' request.body # request body sent by the client (see below) reques...

    Related:
    1. Documentation sinatrarb.com 02 May '12, 2pm
  • Documentation

    sinatrarb.com 02 May '12, 2pm

    A whirlwind tour of Sinatra’s most interesting features. Configuring Settings Detailed documentation on all of Sinatra’s built-in settings and using set , enable , and disable to configure them. Testing Sinatra with Rack::Test Guide to testing Sinatra apps. Sinatra::Contrib A collecti...

    Related:
    1. README sinatrarb.com 02 May '12, 2pm