<<2010-03-10 2010-03-12>>
    Mar 11 00:00
    bradgonesurfing joined #sinatra
    flexd joined #sinatra
    Mar 11 00:12
    mitkok joined #sinatra
    RichGuk joined #sinatra
    Mar 11 00:19
    ujihisa joined #sinatra
    Mar 11 00:32
    russm left #sinatra
    Mar 11 00:40
    defunkt joined #sinatra
    loincloth joined #sinatra
    Mar 11 00:45
    crohr joined #sinatra
    Mar 11 00:52
    bmizerany joined #sinatra
    loincloth joined #sinatra
    Mar 11 01:03
    ph^ joined #sinatra
    Mar 11 01:21
    philly-mac joined #sinatra
    philly-mac
    Hi, anyone here have experience using the padrino-framework that sits on top of sinatra?
    bmizerany joined #sinatra
    hadees joined #sinatra
    Mar 11 01:33
    bradgonesurfing joined #sinatra
    philly-mac left #sinatra
    Mar 11 01:46
    hadees joined #sinatra
    Mar 11 01:56
    RichGuk joined #sinatra
    erthad joined #sinatra
    Mar 11 02:31
    hadees joined #sinatra
    Mar 11 02:37
    TomV-415 joined #sinatra
    Mar 11 02:52
    khaase joined #sinatra
    fbru02 joined #sinatra
    Mar 11 03:05
    crohr joined #sinatra
    jeremyevans joined #sinatra
    fbru02 joined #sinatra
    Mar 11 03:23
    loinclot_ joined #sinatra
    Mar 11 03:31
    gma joined #sinatra
    Mar 11 03:41
    huma joined #sinatra
    loincloth joined #sinatra
    Mar 11 03:48
    mitkok joined #sinatra
    rtomayko joined #sinatra
    loincloth joined #sinatra
    Mar 11 03:54
    qwerxy joined #sinatra
    tbuehlmann joined #sinatra
    Mar 11 04:01
    futurechimp joined #sinatra
    Mar 11 04:08
    huma
    how do i get current app :env option?
    Mar 11 04:29
    ibacchus joined #sinatra
    soveran joined #sinatra
    Mar 11 04:40
    ecin_ joined #sinatra
    alexmchale joined #sinatra
    Mar 11 05:05
    zelnick joined #sinatra
    cypher23
    huma, `settings.environment'
    (`options' is an alias for settings)
    Mar 11 05:12
    cypher23
    huma, also, settings is only available from 0.9.5 onwards
    zelnick
    hey, are there any helpers to make a (DELETE|PUT) Request from a view?
    harryv
    zelnick: you can use the _method hack.
    cypher23
    zelnick, in what sense? Via AJAX?
    zelnick
    im trying to keep my application restful
    so i just want to delete a resource in the db...
    cypher23
    zelnick, as harryv said, just do a POST, and have a parameter called '_method' set to either 'put' or 'delete' depending on what you want to do
    zelnick
    allright, thx guys
    cypher23
    the MethodOverride Middleware will then convert the POST to the appropriate HTTP verb
    zelnick
    thats how rails does it, right?
    harryv
    yeah
    cypher23
    they use the same middleware
    harryv
    if you have a top level app it's enabled by default. if you subclass Sinatra::Base you have to `enable :method_override` (in some earlier version its :methodoverride iirc)
    Mar 11 05:22
    zelnick
    its, working thx :)
    Mar 11 05:38
    rsinger joined #sinatra
    qwerxy joined #sinatra
    Mar 11 06:04
    warthurton joined #sinatra
    warthurton joined #sinatra
    ecin joined #sinatra
    Mar 11 06:18
    slaskis joined #sinatra
    santiago joined #sinatra
    santiago
    hi all. i want to apply a filter only to certain routes, how to do that? is it possible at all?
    tbuehlmann
    you have to check the route, if that wasn't changed
    santiago
    check the route?
    namelessjon
    In the before filter
    tbuehlmann
    right, I assumed you are already working with it
    Mar 11 06:30
    akahn joined #sinatra
    Mar 11 06:40
    hipertracker joined #sinatra
    santiago
    i don't know what it means to "check" the route
    anyways ...
    Mar 11 06:45
    santiago
    anyone with experience with sinatra in GAE?
    cypher23
    santiago, if request.path =~ %r{/some/route}; ...; end
    ^ check if it's the route you want to handle in your before filter
    santiago
    :(
    could be something better
    anyone with experience deploying sinatra to GAE?
    cypher23
    santiago, you can also define multiple handlers with the same route, and simply call `pass' if the handler thinks it can't handle the request
    then sinatra will pass the request to the next handler with the same route
    Mar 11 06:55
    akahn joined #sinatra
    Mar 11 07:02
    huma
    cypher23: thanks
    also, the example is missing "type=hidden" at http://sinatra-book.gittr.com/#the_put_and_delete_methods :)
    qrush joined #sinatra
    Mar 11 07:08
    pjammer
    no no this is what i need. request.query_string
    SkramX
    santiago: i know people who have deployed sinatra to GAE, what's wrong?
    Mar 11 07:28
    kristopher joined #sinatra
    pjammer joined #sinatra
    santiago
    SkramX: only route that works is '/', whenever i use another route GAE complains by telling the file does not exist
    Mar 11 07:33
    akahn joined #sinatra
    mjw2 joined #sinatra
    in the changelog for 0.9.2, there were some GAE fixes
    santiago
    i'm using 0.9.6
    Mar 11 07:41
    cypher23
    santiago, are your paths prefixed with a '/'?
    ie., get '/foo/bar', or get 'foo/bar'?
    santiago
    yes sir
    cypher23
    try removing that
    santiago
    prefixed with /
    remove the '/' ?
    cypher23
    yeah
    just test it with one URL
    santiago
    ok, i'll check
    it is only happening with POST routes
    coderdad joined #sinatra
    Mar 11 07:49
    santiago
    :(
    with GET work aright, the prob happen with POST routes
    cypher23
    weird
    santiago
    Mar 11, 2010 2:48:54 PM com.google.appengine.tools.development.LocalResourceFileServlet doGet
    WARNING: No file found for: /project.html
    the is the route "/project", later "project" as you suggested
    and then i do ...
    RestClient.post "http://localhost:8080/project", '{name:"First project", description:"First project created in GAE datastore"}'
    then i get the warning
    it seems that GAE is passing a GET request to sinatra, i think that because of this ... Mar 11, 2010 2:48:54 PM com.google.appengine.tools.development.LocalResourceFileServlet doGet
    doGet
    loincloth joined #sinatra
    Mar 11 07:55
    cypher23
    santiago, I've never done anything with GAE (or jRuby, for that matter), so I can't help you there
    bbttxu joined #sinatra
    Mar 11 08:02
    stepheneb joined #sinatra
    mitkok joined #sinatra
    akahn joined #sinatra
    Mar 11 08:09
    fbru02_ joined #sinatra