09:00
sporkmonger_ joined
09:58
monsieurledan joined
10:40
<naeu>
i'm trying to get a super-simple sinatra app running for prototyping purposes, but am having trouble with using it with DataMapper
10:40
<naeu>
here's the source: http://gist.github.com/108801
10:41
<naeu>
somehow Datamapper isn't creating new records
10:47
<harryv>
major heroku outage :(
10:53
<Lenary>
harryv broke heroku!
12:32
<vjr>
sinatra is just too easy!
13:13
sporkmonger_ joined
15:39
<piglop>
my layout is not included when i call "get" in a unit test. how can i change that ?
15:40
<sr>
piglop, I can't think of any reason why it'd not. can yo gist your app/test ?
15:45
<piglop>
i'm using cucumber
15:53
<piglop>
sr: http://gist.github.com/108972
15:54
<piglop>
when i check manually, the layout is used
15:56
<sr>
piglop, which sinatra version?
15:56
<cloudhead>
is sinatra rack 1.0 and ruby 1.9 compatible?
15:56
<sr>
cloudhead, sinatra-sinatra from github is
15:56
<piglop>
st: 0.9.1.1
15:56
<piglop>
sr: 0.9.1.1
15:56
<sr>
(ie, gem install sinatra-sinatra)
15:57
<cloudhead>
sr: thanks
15:57
<Lenary>
anyone remember that tweet by dhh about the gogaruco that was so funny
15:58
<Lenary>
it was a question that he answered in the stupidest way
15:58
<Lenary>
i want to find it again...
15:58
<piglop>
sr: the full step file, if the requires or includes matter : http://gist.github.com/108977
15:59
<sr>
piglop, shouldn't Sinatra::Test be included into cuke's World or something like that?
15:59
<sr>
piglop, http://wiki.github.com/aslakhellesoy/cucumber/sinatra
15:59
<piglop>
hmm, maybe
16:00
<sr>
btw, Sinatra::Test will be deprecated in the upcoming release, so you might want to use Rack::Test instead
16:05
<piglop>
sr: same problem with World ( http://gist.github.com/108977 )
16:09
<Lenary>
i found the tweet everyone
16:09
<Lenary>
even though it was grossly off-topic
16:11
<sr>
piglop, you're missing Test::Unit::TestCase.send :include, Sinatra::Test
16:15
<piglop>
sr: i switched to rack-test and added the Test::Unit line, but I still don't have the layout in the test
16:15
<piglop>
http://gist.github.com/108977
16:16
<piglop>
(i tried the Test::Unit inside World too)
16:16
<sr>
hurm. I can't help you much I am afraid. I don't know enough about cucumber
16:17
<sr>
try to find an app that uses cuke or ask on their irc channel
16:17
<piglop>
ok, thank you
16:29
<mynyml>
anyone knows where i could find simple docs for mime type handling?
16:29
<mynyml>
i'm seeing :provides in the source for HTTP_ACCEPT ...
16:29
<Lenary>
mynyml: look for stylesheets stuff
16:30
<Lenary>
there is a way of rendering sass in which you can specify the mime type
16:30
<Lenary>
i think you just add the thing onto the end
16:33
<* mynyml>
is looking into it
16:46
<piglop>
sr: app_file is wrong, so it looks for the layout in the wrong directory
16:47
<sr>
aaaah, of course
16:47
<sr>
and when you do `ruby app.rb`, sinatra can infers it from $0
16:49
<piglop>
here's the caller stack when sinatra initializes app_file inside cucumber : http://gist.github.com/109000
16:50
<piglop>
should sinatra ignore polyglot.rb like custom_require ?
16:51
<piglop>
or should i specify the app_file somewhere ?
16:51
<cypher23>
piglop, "set :views, 'path/to/views'" is probably the easiest option
16:52
<sr>
set :app_file, __FILE__ is the easiest IMO
16:52
<sr>
sinatra can then infers path to views and public folder from it
16:54
<piglop>
it works. thank you !
17:18
<qrush>
is there a classy way of doing TestUploadedFile in sinatra?
17:19
<qrush>
I was looking around the tests and couldn't find a decent example
17:23
<sr>
qrush, rack/test has built-in support for it
17:25
<qrush>
ah, i figured
17:25
<qrush>
i was on the plane and without interwebs
17:29
<cypher23>
qrush, what, you don't have GitHub mirrored locally? :)
17:29
<cypher23>
I acutally have a script that I just need to point to a username, and it mirrors all his repos
17:29
<cypher23>
(or updates them)
17:30
<cypher23>
quite useful
17:30
<sr>
cypher23, gist! :)
17:32
<cypher23>
sr, http://github.com/dustin/py-github/tree/master
17:33
<cypher23>
or if you just want to keep a bunch of git/hg/svn/bzr repos up to date, I have a thor file for that: http://gist.github.com/109022
17:35
<sr>
ooh nice! I looked for his awesome git vizualisation for ages
17:35
<sr>
<3 the gc task
17:38
<sr>
w00t! sinatra/.git went from 20M to 2M
17:38
<cypher23>
sr, though I'd be careful with the gc --aggressive with very large repos like webkit or postgresql
17:38
<cypher23>
they both took about an hour to repack
17:39
<cypher23>
and git grew to over 1gb size during that time
17:39
<sr>
I actually have an alias for `du -hc .git | tail -1 && git gc && du -hc .git | tail -1` :P
17:41
<cypher23>
hm, I could add an "before - after" comparison to the gc task :)
17:42
<sr>
what are "loose object" exactly btw?
17:43
<cypher23>
if you create a commit, git generates a commit object
17:43
<cypher23>
under .git/objects
17:44
<cypher23>
so each commit has one object
17:44
<cypher23>
but git can also create packs of commits, which are more efficient
17:44
<cypher23>
(both space- and speed-wise
17:45
<cypher23>
sr, http://book.git-scm.com/7_how_git_stores_objects.html
17:46
<sr>
ah, so loose objects are basically object that are already included into a pack?
17:46
<cypher23>
no, loose objects are commits that aren't in a packfile yet
17:47
<sr>
wow. amazing. I didn't follow book.git-scm
17:50
<sr>
thanks, cypher23
19:09
andyisnowskynet joined
20:51
<syd_>
andy_h: that client is fucking NICE!
23:18
blakemizerany joined
23:35
andyisnowskynet left