04:27
<myabc>
snusnu: Any quick idea with Rails 3 + DM why my default_repository setting is being respected with "rails console" but not with "rails server"?
04:27
<myabc>
snusnu: I kind of suspected something with either the benchmarking adapter.. or ControllerRuntime
04:32
<snusnu>
myabc: hmm weird, no idea tbh, what exactly do you mean with default_repository setting, Model#default_repository_name ?
04:33
<myabc>
snusnu: sorry - yep, I meant overriding the class method Model#default_repository_name
04:34
<myabc>
snusnu: In Console - Model#repository_name == Model#default_repository_name and in my Controller Model#repository_name == 'default'
04:34
<snusnu>
myabc: hmm, probably the benchmarking_adapter yeah, seems like some adapter related code depends on ivars being setup (at least that's how i "understood" the previous tickets, when i skimmed over them=
04:34
<snusnu>
myabc: hmmm
04:35
<myabc>
snusnu: Yeah I tried out Xavier's fork.. but its broken from what I can tell!
04:36
<myabc>
snusnu: since DataMapper.repository.adapter.reset_runtime is no longer defined
04:36
<myabc>
snusnu: but just thought you might have an idea :) guess I need to do some debugging
04:40
<snusnu>
myabc: this is very weird, i see no reason why it would interfere with default_repository_name .. on both ends, controller_runtime and bench_adapter
04:42
<myabc>
snusnu: Yep you're right! -- I tried disabling controller_runtime, bench_adapter. No change.
04:44
<myabc>
snusnu: found it.. disabling IdentityMap did fix it :)
04:44
<myabc>
snusnu: that's the culprit!
04:47
<snusnu>
myabc: whoa
04:48
<myabc>
snusnu: so I guess the DataMapper.repository block is resetting the repo to default
04:48
<myabc>
snusnu: (in identity_map.rb)
04:49
<snusnu>
myabc: ahh yes! and it's even mentioned in the readme! :P
04:49
<snusnu>
myabc: although i'm pretty sure i actually haven't tried "the workaround"
04:49
<snusnu>
myabc: i just wrote it down from what i remembered …
04:50
<snusnu>
myabc: i guess the README doesn't mention that exact problem of course, but iirc it says something about always using :default unless you explicitly open other repo blocks
04:50
<snusnu>
myabc: i wonder how that could be made smarter
04:51
<snusnu>
myabc: how's that working with merb(_datamapper) btw?
04:53
<myabc>
snusnu: Yeah sorry, I should have read the README thoroughly.
04:53
<namelessjon>
It works just the same, there. Since it's how DataMapper treats repository blocks. (It helps to think that most models have: def self.default_repository_name; :default; end - repository blocks is how you override this.)
04:54
<myabc>
namelessjon: thanks - I never used multi-repos with merb
04:55
<snusnu>
namelessjon: right, for smarter behavior in that scenario, rack would need to know the model to get at a "smarter" repo name
04:56
<snusnu>
ah, possibly xavier :P
04:56
<namelessjon>
snusnu: Well, you could allow for something like a /route_regex/ => :repo mapping in the setup.
04:56
<snusnu>
namelessjon: yep, that's an alternative
04:57
<namelessjon>
snusnu: Since I don't see how the rack middleware can know of what models will be used 'below' them.
04:59
<snusnu>
namelessjon: yeah, it's earlier in the cycle, it needs params to get at a repo name … even if the IM wrapping would be in rails/controller land, we'd still need to let the controller know about the resource it's handling to respect the default_repo_name
05:01
<namelessjon>
snusnu: It would need params and knowledge of how a rails controller worked and oh my. :) routes regex might be simpler.
05:02
<snusnu>
namelessjon: mosdef
05:03
<snusnu>
btw guys, anyone plans on going to euruko in krakow this year? i think i might make it to my first ever conference this year :)
05:05
<myabc>
snusnu: I am thking about it.. was just asking dbussink the same question!
05:05
<myabc>
snusnu: We've missed the deadline for talks though
05:06
<namelessjon>
snusnu: I'd like to, but don't think I have the spare money atm.
05:06
<snusnu>
myabc: yeah, saw that too :/ .. and tbh i'm not yet entirely certain since i haven't seen prices yet and that's a big point for me .. i'm hoping that getting there and back will be cheap enough so that even i can afford it :P
05:07
<snusnu>
namelessjon: i know how that goes :/
05:07
<myabc>
namelessjon: I think Euruko is pretty inexpensive as conferences go though.
05:08
<snusnu>
myabc: that's what i was hoping
05:09
<myabc>
snusnu: come via Berlin
05:10
<namelessjon>
myabc: I'm pretty broke, though :/ But if I can afford it, I probably will come.
05:10
<myabc>
namelessjon: you're a PhD student right?
05:10
<snusnu>
myabc: that's a good idea actually! sometimes we can get 29€ tickets from linz to berlin, depends on dates and availability of course .. the one thing "against" it is that some guys from vienna are already planning to rent a train wagon and hold a pre conf in there already :P
05:11
<myabc>
last year it was €30 or something for the conference.. then its just a matter of finding a flight
05:11
<snusnu>
now that sounds good!
05:11
<snusnu>
barcelona, right?
05:11
<myabc>
snusnu: last year was barcelona
05:11
<snusnu>
i wouldn't expect krakow to be much more expensive then
05:12
<namelessjon>
myabc: Was. Now looking for a job. I could change my nick to drnameless, but that would make me sound like a bond villian ;)
05:12
<snusnu>
heh namelessjon, so you're finally done with it?
05:14
<namelessjon>
Yep, finally done (bar the graduation ceremony). But I have to go run some errands, so catch you all later.
05:14
<snusnu>
congratz man!
05:14
<namelessjon>
Thanks
05:15
<snusnu>
i'm off to the office too .. laterz
05:18
<myabc>
snusnu: later
05:18
<myabc>
namelessjon: bfn
11:34
<github>
datamapper.github.com: master Alex Coles * da9b532 (1 files in 1 dirs): Work-around a Maruku Markdown-parsing warning ... -
http://bit.ly/bK259z
11:37
<github>
datamapper.github.com: master Alex Coles * b3b55fb (1 files in 1 dirs): Fix typo in Properties documentation ... -
http://bit.ly/9e3qsi