--- Log opened Wed May 28 00:00:28 2008
00:06 < antares> dkubb: ok, separated, and autotest config is almost there
00:06 < dkubb> antares: great
00:08 < dkubb> ssmoot: there shouldn't be any problems if we have the this in the Rakefiles:
http://github.com/sam/do/tree/master/do_mysql/Rakefile#L2800:08 < dkubb> ssmoot: and of course make sure the gem() methods specify the correct version.. that is where the DataMapper::VERSION would come in handiest
00:09 < cschneid> with the 0.9 release, where can I find the docs on how to instantiate an sqlite db (ie, the arguments for Database.setup)?
00:09 < ssmoot> dkubb: righto
00:09 < ssmoot> cschneid: DataMapper.setup(:default, 'sqlite3:///home/cschneid/test.db')
00:10 < cschneid> ssmoot, is there a hash of options format for that same thing, or should I just build the connection string myself with the components?
00:13 < ssmoot> cschneid: there is:
http://github.com/sam/dm-core/tree/master/lib/data_mapper.rb#L11800:14 < cschneid> ssmoot, great, thanks for the pointer, I'll check itout
00:21 < antares> dysinger: ping
00:21 < antares> dysinger: I remember your patch to merb that picked right spec command in autotest config. Was it you?
00:32 < methods> 0.9.0 is out! ?
00:32 < GitHub128> do: Dan Kubb master SHA1-63a9a11
00:32 < GitHub128> Set the dependency for data_objects to be equal to the package version
00:32 < GitHub128>
http://github.com/sam/do/commit/63a9a114580bc8a75feedb491fa6a5f25c2e1f3300:32 < GitHub41> dm-more: Dan Kubb master SHA1-fb8a533
00:32 < GitHub41> Set the dependency for dm-core to be equal to the package version
00:32 < GitHub41>
http://github.com/sam/dm-more/commit/fb8a533453fc341b30336007d79f83abc46d470000:33 < antares> dkubb: I am about to push, you want to see diff first? Autotest config added, fixtures and spec groups are much cleaner now.
00:34 < antares> methods: 0.9.0.1 is out
00:34 < dkubb> antares: no, it's ok. I'll check the diff after you commit it
00:34 < dkubb> antares: I trust you :)
00:34 < methods> what do i have to read to convert my code over to 0.9.0.1 ?
00:35 < jeckel> methods: start with reading this:
http://datamapper.org/articles/datamapper_090_released.html00:35 < dkubb> methods:
http://wiki.datamapper.org/doku.php?id=upgrading-from-0.300:35 < antares> dkubb: interesting, I get fatal: The remote end hung up unexpectedly
00:36 < dkubb> antares: do you have commit rights?
00:36 < antares> dkubb: but fetch and rebase were ok
00:36 < antares> dkubb: I used to have it :)
00:36 < antares> dkubb: ah I see, I need to replace url with "push url"
00:37 < dkubb> antares: yeah, you can edit your .git/config file to point to the push URL
00:37 < dkubb> antares: inside the 'remote "origin"' section
00:37 < antares> dkubb: I used "proper" way with git remote :)
00:37 < dkubb> heh
00:37 < antares> dkubb: thanks
00:38 < antares> pushed
00:38 < GitHub121> dm-more: trogdoraoeu master SHA1-c431e3a
00:38 < GitHub121> Make MyModel.all.to_yaml and MyModel.all.to_json work.
00:38 < GitHub121>
http://github.com/sam/dm-more/commit/c431e3a7353d0184699b321e9038eefbdb8ae34000:38 < GitHub121> dm-more: trogdoraoeu master SHA1-0ca8684
00:38 < GitHub121> Make MyModel.all.to_xml and MyModel.all.to_csv work.
00:38 < GitHub121>
http://github.com/sam/dm-more/commit/0ca868447d07629325179ea2c1d03cc81744c26900:38 < GitHub121> dm-more: Michael S. Klishin master SHA1-9cedbce
00:38 < GitHub121> Group spec examples by serialization method.
00:38 < GitHub121>
http://github.com/sam/dm-more/commit/9cedbce4ce66061cf961c3493c11209f0c28aa8300:38 < GitHub121> dm-more: Michael S. Klishin master SHA1-2978270
00:38 < GitHub121> Use one file for one serialization method in spec suite. Add Autotest config.
00:38 < GitHub121>
http://github.com/sam/dm-more/commit/2978270a8cfeb93b7ec47cc5e5617f808f287c6c00:38 < antares> there are also patches I applied for serialization of collections
00:41 < benburkert> dkubb: what does of the Resource.inherited class method?
00:41 < benburkert> err, what is the purpose/what does it do?
00:42 < dkubb> benburkert: inherited is a method ruby calls when you inherit a class
00:42 < dkubb> benburkert: it's part of the ruby language.. like a hook
00:42 < benburkert> ok, but i'm seeing it called in code without inheriting models
00:42 < dkubb> benburkert:
http://www.ruby-doc.org/core/classes/Class.html#M00281200:43 < dkubb> benburkert: interesting. I'm not sure if that's a DM bug or a ruby bug.
00:43 < benburkert> it should only be called when you have something like 'class ModelB < ModelA' right?
00:43 < dkubb> benburkert: correct
00:44 < benburkert> dkubb: also, for some reason Symbol has been extended with DataMapper::Resource
00:45 < benburkert> 1 sec
00:45 < dkubb> benburkert: that is totally weird.. I know we extend Symbol with some DM::Query::Operator stuff
00:45 < dkubb> benburkert: ... but nothing with DM::Resource should touch Symbol
00:46 < dkubb> benburkert: er.. you get what I mean. I'm not a huge fan of extending the core classes anyway.. except when totally necessary
00:47 < methods> which version of merb_datamapper do i need ?
00:47 < pdarnows> has anyone had any luck with many-to-many joins of any kind?
00:47 < dkubb> antares: this may be a dumb question, but when stuff is serialized why does it sometimes go as: ":id:" .. I thought "id:" without the leading colon was valid YAML syntax?
00:48 < dkubb> antares: could it just be a YAML (the ruby library) quirk?
00:48 < antares> dkubb: both are valid, :prop: value are yaml hashes/dictionaries
00:48 < benburkert> dkubb: i think i might have figured it out, we left a < on the end of the class declaration line
00:49 < benburkert> so it was doing 'class ModelA < include(DataMapper::Resource)'
00:49 < antares> dkubb: it is the way YAML from standard library work
00:49 < dkubb> antares: hehe, I noticed it because I'm totally anal about my generated markup.. I always look for ways to cut down the byte count.. I usually even strip whitespace (in formats that allow it) to make it even more compressed
00:49 < benburkert> that's why it was calling inherited, weird stuff
00:49 < antares> dkubb: btw, do you think we need autotest configs for other -more libraries?
00:50 < benburkert> weird in that it almost worked
00:50 < dkubb> antares: I'm not sure how autotest is configured on the other -more libraries. It would be nice if it worked consistently
00:50 < dkubb> benburkert: when you say "we left a <" do you mean you and the devs you're working with.. or we, as in the dm-core committers?
00:50 < benburkert> my dev guys :)
00:50 < dkubb> heh
00:51 < antares> dkubb: other libraries have no autotest configuration at all ;).
00:52 < dkubb> benburkert: that is weird that it sorta worked. I wonder if maybe it was running the include() method, and it's return value was being used as the class ModelA was inheriting from. afaik you can use arbitrary code after the < as long as it returns something that acts like a Class
00:52 < antares> dkubb: autotest configuration uses classes => we can inherit them, but I am not sure where to put base class
00:52 < antares> trogdoraoeu: your patches are in, thank you!
00:52 < dkubb> antares: in the case where there is no autotest configuration at all, would it just work according to commonly understood conventions?
00:53 < antares> dkubb: yes, but commonly for autotest (which may be different from your expectations :D)
00:54 < dkubb> bbiab
00:54 < antares> dkubb: it works in all of them, but if you need separations like I did, manual mappings are needed
00:55 < benburkert> dkubb: yeah, i think the include(DM::Resource) was returning Object, so it might be helpful to raise an exception in inherited class if target is an Object
00:56 < benburkert> i can probably nock out a patch w/ specs in a little while
00:56 < methods> is merb_datamapper 0.9.2 ready for 0.9.0.1 ?
01:05 < benburkert>
http://pastie.org/20438501:05 < benburkert> ^^^ crazy
01:09 < antares> methods: use merb_datamapper 0.9.3 for DM 0.9.0.1
01:23 < methods> extconf.rb:1: command not found: pg_config --includedir
01:23 < methods> what's this ?
01:27 < methods> why do i need postgress dev stuff ?
01:34 < benburkert> methods: you only need it if your planning to use do_postgres
01:34 < methods> well i'm getting failed messages when trying to install ....
01:34 < methods> extconf.rb:1: command not found: pg_config --includedir
01:34 < methods> pg_config is from postgress
01:36 < benburkert> right, it's trying to build the postgres gem
01:36 < benburkert> if you don't need do_postgres, then don't worry about it. otherwise, install the postgres headers
01:40 < veritas> is there a dm property option to specify the equivalent of attr_accessible in ActiveRecord?
01:41 < veritas> in 0.9 of course
01:46 < methods> Could not find dm-couchdb-adapter (>= 0.9.0.1) in any repository
01:46 < methods> dude it says that while trying to install that very package
01:54 < methods> > gem install dm-couchdb-adapter # ERROR: While executing gem ... (Gem::GemNotFoundException) Could not find dm-couchdb-adapter (> 0) in any repository
01:55 < raspberry-lemon> there's a couchdb adapter? :o
01:56 < bradfordw> @methods:
http://wm.lighthouseapp.com/projects/4819-datamapper/tickets/31301:57 < bradfordw> basically download dm-more from github, untar, cd to adapters directory and rake gem; it should get you going.
01:58 < methods> um so it's released but yet we can't install it ?
01:59 < methods> am i still forced here to use development install ? or what's going on ?
02:00 < methods> and dm-more is what fails
02:01 < bradfordw> Not sure dude, I had the same problem this morning and that fixed it :)
02:03 < methods> well i don't know how to get dm-more from github
02:08 < methods> all that did was build dm-core
02:08 < pdarnows> does anyone know how to build the docs for dm-core from source?
02:09 < pdarnows> I got yard...and I ran rake doc...now, after a load of warnings, there's an empty doc directory
02:12 < aflatter> run only rdoc
02:12 < methods> bradfordw: idk man then it says that i need merb_datamapper 0.9.0.1 when the new one is merb_datamapper 0.9.3
02:14 < pdarnows> @aflatter: thanks, that'll teach me to get fancy. :)
02:18 < afrench> pdarnows: you can run `yardoc` in the root of dm-core and it'll generate yard-docs
02:20 < pdarnows> @afrench: I tried that, get the same results as when I rake doc:
http://pastie.org/20440402:21 < pdarnows> left w/an empty doc dir
02:22 < away> ssmoot: ping
02:22 * afrench looking into it
02:22 < jeckel> ug, ssmoot:ping
02:25 < afrench> pdarnows: I can't seem to reproduce what your seeing....yardoc seems to generate contents of /doc/ for me
02:26 < pdarnows> afrench: mmmm, too bad. which version of yard do you have? I have 0.2.1, are you on edge or something?
02:27 < afrench> I just pulled down edge from github....maybe that's it
02:27 < pdarnows> k, let me try that, thanks
02:31 < dkubb> I'm seeing an error with edge Yard and yardoc in dm-core's root:
http://pastie.org/private/nwop1zkvkfcrqdbyslbyq02:32 < pdarnows> dkubb: that's exactly what I get
02:32 < dkubb> yeah, looks the same
02:33 < pdarnows> think that's a yard or dm-core problem?
02:36 < afrench> I remember something about having to comment out a line where it threw :eof too early....or something
02:36 * afrench uninstalling completely and pulling yard down again
02:36 < pdarnows> I see in the yard source there's only 2 symbols it throws, :RET and :eof...and :RET it catches.
02:44 < GitHub19> dm-more: Dan Kubb master SHA1-77db211
02:44 < GitHub19> Added explcit version for merb_datamapper dependency
02:44 < GitHub19>
http://github.com/sam/dm-more/commit/77db21173fcbe9a60f6999c31c9d22c8c267fa7902:50 < methods> did someone just do that in response to me
02:50 < afrench> dkubb: ^^
02:50 < dkubb> methods: nope. I did it in response to something I found independently. I'm happy if it helps you tho :)
02:52 < dkubb> if anyone is having trouble install the gems, in the interim, you could always use the sake tasks outlined here to install from the latest in github with just a couple of commands:
http://datamapper.org/articles/stunningly_easy_way_to_live_on_the_edge.html02:52 < dkubb> other than the initial install of sake and it's dependencies, keeping stuff in sync can be done in 10 seconds
02:52 < pdarnows> could someone maybe tell me what I'm doing wrong with many-to-many joins here:
http://pastie.org/20442302:52 < pdarnows> far as I can see, what I've got is isomorphic to what's in the specs, which pass just fine
02:54 < methods> dkubb: so now the new link on teh site will download the update ?
02:56 < pdarnows> ohhhhhhh wait...has n => belongs_to is pending, dammit
02:58 < afrench> pdarnows: ?
02:59 < pdarnows> afrench: yeah, check in association_spec:530 and :875-882
03:00 < pdarnows> if you comment out the pending on
03:00 < pdarnows> 876, the example fails
03:00 < afrench> hmmm
03:02 < dkubb> anyone know if there's a way with rspec to mark something as pending, but still run the specs, and if they unexpectedly pass you count that as a fail?
03:02 < dkubb> hope I made sense with that. I basically want to know when stuff I've marked as pending starts to pass
03:02 < afrench> that's kind of....backwards.....a little.....
03:03 < dkubb> it is, but it's something other testing frameworks I've worked in have done
03:03 < pdarnows> dkubb: I think this is what you mean:
http://pastie.textmate.org/20442703:03 < pdarnows> i.e. just pass a block to pending
03:03 < dkubb> pdarnows: yeah.. you mean that actually works?
03:04 < pdarnows> yep...caught me by surprise the first time
03:04 < dkubb> wow. that's really neat
03:04 < dkubb> afrench: the idea is that if something starts passing you want to know about it.. it's better than manually going around and uncommenting pending stuff every once in a while
03:05 < pdarnows> I *think* you can wrap either a whole example or just a select part like that
03:05 < dkubb> afrench: I was cleaning up the integration specs the other day and just for fun I uncommented all the pending specs in one spec.. and half of them passed, but whomever made them pass forgot about it
03:05 < afrench> can't complain to loudly about that
03:06 < afrench> seems like `spec` should have a --try-pending flag that bypasses `pending` and tries them out anyway
03:07 < jayme> sorry, this may be an overly simple question: I am looking through a friends ruby code and I see "Datamapper::Resource" among others, but when I check the datamapper documentation at
http://datamapper.rubyforge.org/, I am unable to find a reference to it(them)
03:07 < dkubb> that trick that pdarnows mentioned should work just fine. I would want to run the specs, knowing they will fail, but it doesn't matter since (I assume) any errors in the pending block would be ignored
03:07 < afrench> jayme: that's old documentation.....which, btw, you just reminded me that we need to update.....so don't worry to much about it
03:07 < jayme> oh ok, thanks, do you know where I can find the new documentation?
03:08 < dkubb> afrench: I think there's a link to that at
http://datamapper.org/docs/03:09 < afrench> a cursory setup is at
http://datamapper.org/docs/ .... though a full rdoc isn't yet available unless you want to generate it yourself (as easy as `rake rerdoc` in the root of dm-core)
03:10 < jayme> ah, sorry I am a bit of a newbie, when you say root of dm-core, which directory are you talking about?
03:10 < afrench> do you have dm-core installed on your box?
03:10 < jayme> yea
03:11 < afrench> (re: newbie) cool, man. glad your here then
03:11 < jayme> :)
03:11 < afrench> ok, CD into a temporary directory somewhere....doesn't really matter....and do `gem unpack dm-core`
03:12 < dkubb> bbiab
03:12 < jayme> alright, it's unpacked
03:12 < afrench> it'll drop a dm-core-0.9.0.1 directory into the present working directory. move into that dir and do `rake rerdoc` and then `open doc/index.html`
03:13 < jayme> i seem to have a problem:
http://pastie.caboo.se/20443103:13 < afrench> the `open doc/index.html` bit is just a quick way on mac osx to open a file....dunno if your on osx or not....that line may be different for you
03:14 < afrench> ooo....so I'm telling you the wrong thing....hang on
03:15 < afrench> ok, instead of `gem unpack dm-core` do `gem install dm-core -i foo`
03:16 < afrench> odd that `gem unpack` didn't come with the rake-file....oh well
03:17 < pdarnows> ok guys, thanks for all the help today...I'm off to go to the bar
03:18 < jayme>
http://pastie.caboo.se/20443503:19 < jayme> ah, updating to .9.1 helped :)
03:20 < afrench> yeah, adding
gems.datamapper.org as a gem source should do the trick
03:21 < afrench> when that works, cd into foo, then cd into docs and you should see a folder for dm-core
03:21 < afrench> that's where the rdoc documentation is
03:21 < jayme> very cool, thanks much :)
03:22 < afrench> sure thing
03:22 < afrench> sorry it's so round-about....wish it was easier
03:22 < jayme> yeah, but it's totally worth it
03:34 < jayme> this might sound odd, but the foo/doc/dm-core directory is empty
03:35 < benburkert> what's the equivalent of 'validates_presence_of', anyone know?
03:35 < afrench> benburkert: validates_present
03:35 < jayme> I almost know..! validates_presents .. ?
03:35 < afrench> yup ;-)
03:35 < benburkert> afrench: awesome, thanks
03:36 < jayme> so foo worked, except that the dm-core-0.9.0.1 directory is empty
03:38 < afrench> jayme: ok, well, next best thing is to just go ahead and pull down edge somewheres and use that then....I guess rubygems likes to screw around with our gems or something
03:39 < kenphused> how long does it generally take for Lighthouse to reflect commits?
03:42 < jayme> hum..
03:42 < afrench> jayme: don't worry, man, pretty dang easy to do as well
03:43 < afrench> (can you tell we're a young library?)
03:43 < afrench> jayme:
http://datamapper.org/articles/stunningly_easy_way_to_live_on_the_edge.html03:46 < jayme> well, sure lets give it a shot :) Is there a gem uninstall dm* ?
03:47 < afrench> I'm not sure, but when you get sake and the sakes tasks installed, there's a `sake dm:gems:wipe` that'll do it for you
03:47 < afrench> if you skip around a little in the how-to, you can likely bypass the setup step
03:49 * afrench brb...making foods
03:49 < jayme> dir
03:50 < jayme> my bad
04:03 < afrench> man, I needed that
04:06 < jayme> oh the docs are in foo/gems, not foo/doc ><
05:33 < dm_newb> could someone explain how a class name defined in the apps/models folder maps to a table name in the database?
05:43 < Frost> dkubb: the arrays I'm talking about, which won't respond to group_by, are for example instances of DataMapper::Collection
06:03 < dkubb> Frost: oh, I can make that happen. Can you file a ticket so it's not forgotten?
06:04 < Frost> dkubb: sure.
06:05 < dkubb> Frost: right now Collection inherits from LazyArray, which is basically just a wrapper around a regular Array. The first time a kicker method is executed, it loads the data, and sets the Array. As of right now it doesn't delegate everything down to the Array.. just the stuff built into Array. I could make it so it hands everything, including custom stuff like group_by down
06:05 < dkubb> Frost: hope that makes sense
06:09 < Frost> dkubb: yep, that does make sense. I'll file a ticket on it as soon as I can.
06:09 < Frost> gotta go grab some breakfast now, but after that..
07:42 < kotrin> >> class Image; include DataMapper::Resource; end
07:42 < kotrin> NameError: uninitialized constant DataMapper::Resource
07:42 < kotrin> from (irb):19
07:42 < kotrin> anyone know solution?
07:42 < postmodern> kotrin, make sure you don't have dm 0.3 installed first
07:43 < kotrin> that would do it
07:43 < postmodern> kotrin, that's what caused it for me
07:43 < postmodern> kotrin, the old datamapper was being loaded which didn't have DataMapper::Resource
07:44 < kotrin> i see
07:45 < kotrin> glad they told us to uninstall 0.3 :)
07:48 < kotrin> thanks for the help postmodern
07:48 < postmodern> kotrin, your welcome
11:01 < advany> Am I doing something wrong with Person.get(:username => params[:person][:username].to_s, :password => params[:person][:password].to_s)?
11:02 < advany> sorry, found it
12:04 < Stjernstrom> Can someone maybe point me in the right direction for speccing out a private method in DataMapper::Collection?
12:06 < hipertracker> I cannot install DataMapper....
http://pastie.caboo.se/20460212:06 < hipertracker>
http://pastie.caboo.se/20460212:07 < hipertracker> could not find dm-couchdb-adapter locally or in a repository
http://pastie.caboo.se/20460412:07 < Stjernstrom> hipertracker: have you tried
12:07 < Stjernstrom> gem sources -a
http://gems.datamapper.org12:07 < Stjernstrom> sudo gem install addressable english rspec
12:08 < Stjernstrom> sudo gem install data_objects do_mysql do_postgres do_sqlite3
12:08 < Stjernstrom> sudo gem install dm-core dm-more
12:08 < hipertracker> yes
12:08 < hipertracker> the last command could not be finished
12:08 < Stjernstrom> All steps succeed except the last one?
12:08 < Stjernstrom> hmm
12:08 < hipertracker> dm-more depends on dm-couchdb-adapter and i cannot install this gem
12:08 < hipertracker> Stjernstrom: exactly
12:09 < Stjernstrom> What errors do you get when installing dm-couchdb-adapter
12:10 < hipertracker>
http://pastie.caboo.se/20460412:11 < Stjernstrom> try this again sudo gem sources -a
http://gems.datamapper.org12:12 < hipertracker>
http://rubyforge.org/search/?type_of_search=soft&words=dm-couchdb-adapter&Search=Search 12:12 < hipertracker>
12:12 < hipertracker> No matches found for dm-couchdb-adapter
12:13 < hipertracker> there is no such gem like dm-couchdb-adapter in SourceForge at all
12:14 < Stjernstrom> hmm, i just found that to. I wonder where i got mine ..
12:14 < hipertracker> magick :)
12:15 < Stjernstrom> There is a chans a got it from my edge install
http://datamapper.org/articles/stunningly_easy_way_to_live_on_the_edge.html12:15 < antares> DM hosts own RubyGems repository
12:16 < antares> but most of people these days live on HEAD anyway, DM is a work in progress
12:16 < hipertracker> Yes, but event the title of this channel says we have an official release :)
12:19 < Stjernstrom> Anyone know if 0.9.0.1 and merb play nice together?
12:27 < advany> Stjernstrom: if you use merb edge and dm edge
12:27 < Stjernstrom> ok, i will update my merb and give it a spin
12:37 < pluesch0r> advany: merb edge being merb 0.9.3?
12:39 < Stjernstrom> 0.9.4 i think
12:40 < Stjernstrom> merb --version
12:40 < Stjernstrom> merb 0.9.4 (dev)
12:42 < pluesch0r> hm
13:07 < advany> Stjernstrom: at least merb 0.9.3 I think
13:08 < Stjernstrom> I have not found any show-stoppers yet in 0.9.4, but have just begun.
13:20 < fmardini> hello guys, a merb_datamapper issue, the datamappersession store is not working properly, the value of data is not being serialized and saved. a one liner patch solves it (
http://pastie.caboo.se/204621 ). i made a ticket on lighthouse but it got marked as spam :(
13:23 < advany> fmardini: ill check it out
13:24 < fmardini> advany: i'd appreciate it
13:32 < GitHub123> dm-more: Abdul-Rahman Advany master SHA1-c47e933
13:32 < GitHub123> save serialized data using set attribute (fmardini)
13:32 < GitHub123>
http://github.com/sam/dm-more/commit/c47e93353797aba29a050a4631c60046fcdbc33c13:32 < advany> fmardini: added to dm-more thnx!
13:35 < fmardini> advany: thanx :)
13:48 < GitHub90> dm-more: Abdul-Rahman Advany master SHA1-72a1784
13:48 < GitHub90> couch db should only run when it is included as an adapter (currectly I can't get it running)
13:48 < GitHub90>
http://github.com/sam/dm-more/commit/72a178414f4a159b5d33878eab44389e5071d5fd13:54 < aidehua> Yikes! When installing dm-core, I get an error saying "RubyGem version error: data_objects(0.9.0.1 not = 0.9.0)".
13:54 < aidehua> Is this a bug? Is this an inappropriate place to mention it?
13:58 < myobie> aidehua: i thought the fixed all of that, do you have the newest newest from github?
14:28 < advany> aidehua: bug in gem, try github (edge)
14:29 < advany> why can't I just do
Item.childeren.new?... with has 0..n
14:38 < postmodern> advany, .new? or just .new
14:38 < advany> postmodern: I am trying to do .new
14:39 < postmodern> advany, well children would return an association, which is not a class
14:39 < postmodern> advany, but having .new() there might be some interesting syntactic sugar
14:39 < advany> mhhh, I try to add it... should be in there...
14:40 < sam3> How do I do an OR ?
14:40 < sam3> Person.all :first_name.like => @terms, :last_name.like => @terms
14:40 < sam3> This is implicitly an AND
14:40 < sam3> But I need an OR.
14:41 < sam3> What if I need more complicated boolean logic?
14:42 < sam3>
http://www.datamapper.org/docs/find.html doesn't mention AND/OR at all...
14:44 < sam3> It seems a shame to have to revert to Person.all :conditions => ['first_name LIKE ? OR last_name LIKE ?', @terms, @terms]
14:44 < sam3> Is there a better way?
14:45 < tpitale> not at the moment sam3
14:45 < tpitale> I'm working on a plugin that will add that support
14:45 < tpitale> OR support, that is
14:46 < aidehua> myobie, advany: Thanks :)
14:47 < sam3> Hmmm. That seems a shade disappointing having watched Yehuda's video presentation where one key theme is that DM doesn't require you to drop to SQL, for more stuff than AR :-/
14:47 < sam3> Maybe it's a 1.0 thing...
14:48 < tpitale> it was felt that OR is used infrequently, given how it would muddle up the syntax using hashes
14:48 < tpitale> find(:field1 => 'value', :field2 => 'value')
14:48 < tpitale> that whole thing
14:49 < tpitale> they just join on AND
14:49 < tpitale> mixing AND and OR gets very complicate
14:49 < tpitale> d
14:49 < advany> find(blabla).or(blabla)?
14:50 < advany> mhhh, that wouldn't work :-)
14:51 < postmodern> actually i think it does work
14:51 < postmodern> i implemented or syntax in another sql project of mine
14:51 < postmodern> you can overload or/and
14:55 < postmodern> bbl going to sleep
14:57 < tpitale> advany, yes, that is what I'm working on
14:57 < tpitale> but, at the same time, it gets more complicated if you want to do nesting
14:57 < advany> tpitale: yeah, but you can't cover every sql case :-)
14:59 < tpitale> not everything but, nesting is pretty basic
14:59 < GitHub86> dm-more: Martin Kihlgren master SHA1-78dcea9
14:59 < GitHub86> Made validates_is_unique accept nil values when :allow_nil is true.
14:59 < GitHub86>
http://github.com/sam/dm-more/commit/78dcea9459b5f5a86c6bb4de29f606bb1dfe133115:00 < tpitale> so, when that is worth anything at all, I'll post that up on github
15:08 < sam3> I look forward to it :-)
15:19 < jarkko> hi there
15:19 < jarkko> what's the correct way to extend DataMapper::Resource nowadays?
15:20 < jarkko> attachmerb_fu uses DataMapper::Base.extend for adding its methods
15:20 < jarkko> however, that doesn't work with modules
15:20 < jarkko> so you can't just replace DataMapper::Base with DataMapper::Resource
15:23 < tpitale> no
15:23 < tpitale> include DataMapper::Resource inside your class
15:23 < tpitale> oh
15:23 < tpitale> for attachmerb_fu
15:23 < tpitale> derp, not sure about that one
15:23 < tpitale> you may have to wait until someone updates it
15:24 < tpitale> unless you feel like getting dirty and seeing what the modules are extending
15:24 < jarkko> I'm willing to to do that myself, just want to know what the way to do it :-)
15:24 < tpitale> you'll have to look at DataMapper more closely
15:25 < tpitale> to find out where & what attachmerb_fu is trying to add
15:25 < jarkko> with the old way, it just extended DataMapper::Base with its methods
15:25 < tpitale> I suggest a fork on github of attachmerb_fu, and then, after you've made your changes, send them a pull request
15:25 < jarkko> not sure what the correct way to do that with modules is
15:26 < tpitale> well, since there is no DataMapper::Base...
15:27 < methods> dkubb's update last night broke installing dm-more from github to get around the "dm-more requires dm-couchdb-adapter = 0.9.0.1 " bug
15:27 < jarkko> tpitale: I know that
15:28 < jarkko> oh, it works using include
15:28 < jarkko> cool, let's see...
15:28 < tpitale> oh
15:28 < tpitale> module wouldn't use extend
15:28 < tpitale> I didn't realize that was your problem
15:28 < tpitale> my bad
15:28 < tpitale> sorry
15:28 < jarkko> the thing is module doesn't complain about using extend, it just doesn't add the methods
15:29 < tpitale> gotcha
15:29 < tpitale> you can do include. like you said
15:29 < jarkko> hmmm... still get undefined method 'has_attachment'
15:30 < jarkko> I'm probably requiring attachmerb_fu too late or something
15:31 < tpitale> not sure
15:37 < aflatter> Is there any issue with using attr_accessor in Resources?
15:55 < sam3> jarkko: To add instance methods to any class that includes DataMapper::Resource, you can do the following:
15:56 < sam3> Oops - actually, I mean to add class methods:
15:56 < jarkko> sam3: I'm copying the stuff from dm-validations now
15:57 < jarkko> from the bottom of dm-validations.rb
15:57 < sam3> module DataMapper; module Resource; module ClassMethods; def my_method; puts 'hello'; end; end; end; end
15:57 < sam3> For instance, I used this approach to add some basic paging support to my DM objects:
http://p.ramaze.net/149715:59 < jarkko> ok, got a bit further, now the has_attachment method seems to be found
15:59 < jarkko> attachmerb_fu needs a bit of cleanup anyway, but first I'll try to get it to work
16:01 < jarkko> hmmm... seems the table method is gone in 0.9
16:02 < rowland> Hi, folks! Did dm-couchdb-adapter get missed off
gems.datamapper.org by any chance?
16:06 < jarkko> is storage_name the correct replacement method for table in 0.9?
16:06 < jarkko> I mean, for
table.name16:12 < tpitale> storage_names[:default] = "customer"
16:12 < tpitale> is what I use
16:12 < tpitale> storage_name = would be nice, I haven't tried
16:21 < afrench> the reason why it's not `storage_name =` is because of multi-repository support....a model can belong to an external repository or have more than one table in seperate repos
16:27 < methods> rowland: i can't install either
16:28 < rowland> methods: I originally installed from git, which included the 0.9.0 release of dm-couchdb-adaptor
16:28 < rowland> but since the gems repo on datamapper was put up, there doesn't appear to be that adaptor available
16:28 < rowland> unless there's something I've missed
16:50 < methods> rowland: yea there is a bug on that... and hte fix was to install dm-more from github... which i tried but then it wanted merb_datamapper 0.9.0.1 when it should be 0.9.3 which I think was fixed last night but the fix reintroduced the same problem about dm-couchdb-adaptor...
16:53 < rowland> methods: ah, the plot thickens
16:54 < rowland> I'll just reinstall from git again and wait for 1.0 ;-)
16:59 < methods> rowland: but installing from git is a big mess isn't it
17:13 < advany> methods: is it? use sake, love it
17:14 < mayo> you can have 0.3 installed, bust must be 0.3.1 or 0.3.2
17:18 < rowland> methods: sake is pretty nice to use
17:19 < rowland> gems is just convenient for using elsewhere
17:28 < datafirm> I get this error when trying to install dm-more.. : dm-more requires dm-couchdb-adapter (>= 0.9.0.1)
17:29 < datafirm> Looks like I had an older version 0.9.0.. going to remove that first
17:29 < datafirm> Get the same issue though.. any ideas?
18:11 < datafirm> Hello
18:14 < advany> datafirm: try using edge
18:15 < datafirm> advany: ok
18:15 < advany> datafirm:
http://datamapper.org/articles/stunningly_easy_way_to_live_on_the_edge.html18:15 < datafirm> yup I got that already
18:15 < datafirm> just wanted to stick with the release if I could.
18:15 < datafirm> sake dm:gems:refresh ;)
18:15 < advany> datafirm: well, release its not going to work (is buggy)
18:15 < datafirm> no problem
18:17 < afrench> advany: I wouldn't say its buggy....I just flubbed up the dependency declaration in dm-couchdb-adapter when I was trying hard not to
18:18 < afrench> I'll fix it tonight....otherwise wycats will be really pissed at me if he gives a DataMapper presentation and no one can install DataMapper without headache
18:18 < advany> afrench: well, I know, I fixed it next morning ;) but thats a critical bug! :P so release is buggy?
18:18 < advany> afrench: LOL
18:19 < wycats> afrench: agr33d
18:19 < afrench> advany: yeah, I mean, a new release that doesn't have it's dependencies fracked up
18:19 < afrench> I have an 0.9.1 branch of dm-[core|more] and do on my laptop at home
18:20 < advany> afrench: great! :-) btw, things like adapters like couchdb, shouldn't they be in somewhere else?
18:20 < afrench> first thing (after walking the dog), I'll make it happen
18:20 < advany> its know in dm-more
18:20 < afrench> advany: I was thinking that too....a seperate dm-adapters project or something
18:20 < advany> afrench: +1
18:21 < afrench> ssmoot's off caring to sick wife today, so I'll bug him about it tonight or something
18:27 < jarkko> what's the rationale behind there being the ! version of create but not of update_attributes or save?
18:28 < jarkko> in 0.9
18:39 < wycats> afrench: plz let people install it :(
18:51 < advany> wycats: you can always tell people during presentation ... datamapper 0.9.x doesn't work, please use edge... :P
18:52 < wycats> ummmm
18:53 < wycats> ummmmmm :'(
19:02 < afrench> ....yeah, don't really want to do that
19:08 < afrench> it's a pretty easy fix, won't take me too long to do
19:13 < eetfunk> is that normal? dm-more requires dm-couchdb-adapter (>= 0.9.0.1)
19:13 < eetfunk> I don't want to use CouchDB, why am I required to install the adapter?
19:18 < jarkko> is before :valid?, :some_method the correcxt replacement for before_validation in AR?
19:20 < eetfunk> i guess I'm not alone, just found this pastie:
http://pastie.caboo.se/pastes/204602. Is there a fix/workaround for that?
19:32 < arol> eetfunk, use sources rather then gems
19:32 < arol> git clone git://
github.com/sam/dm-core.git19:32 < arol> cd dm-core
19:32 < arol> rake install
19:32 < arol> same for dm-more
19:33 < arol> git clone git://
github.com/sam/dm-more.git19:33 < eetfunk> kind of funny that the "official" build doesn't install :)
19:33 < eetfunk> they should push a new build out imo
19:34 < arol> yeah, they will, just a bit buzy now i guess :)
19:34 < eetfunk> its working now, thnx!
19:34 < arol> yw
19:34 < jarkko> just to make sure, does anyone have "before :valid?, :some_method" working in their code?
19:36 < jarkko> I'm getting a weird error using it and the error stack is kind of useless since it goes down to hooks
19:36 < jarkko> i.e. the methods the stack trace mentions are not in the files the trace claims them to be
19:44 < Stjernstrom> eetfunk, there is some requirement bug in this release. I am sure someone will fix it soon.
19:44 < eetfunk> k
19:44 < Stjernstrom> You can always install latest head to get around the problem
19:45 < Stjernstrom>
http://datamapper.org/articles/stunningly_easy_way_to_live_on_the_edge.html19:46 < eetfunk> Stjernstrom: i just thought that the "official" 0.9.1 release would work out of the box.
19:46 < Stjernstrom> me to ;)
19:46 < kenphused> is there a 091 release? (i thought it was 0901)
19:47 < afrench> kenphused: I'm gonna do 0.9.1 tonight....so that we don't see that dm-couchdb-adapter problem
19:47 < afrench> and get onto a major.minor.build version numbering system
19:48 < kenphused> afrench: nice... i thought the 0901 was just to get something out... and that 091 would be beta quality
19:49 < afrench> that was the reasoning behind 0901, yeah
19:49 < kenphused> afrench: you guys kicked major fanny... i appreciate all the work you guys did to get this out
19:49 < afrench> though 091 will be pretty much 0901 with dependencies fixed
19:49 < afrench> and whatever commits happened between monday and tonight
19:53 < Stjernstrom> Can you not just remove " s.add_dependency(%q<dm-couchdb-adapter>, ["= 0.9.0.1"])
19:53 < Stjernstrom> " from dm-more-0.9.0.1.gemspec and the problem is solved?
19:55 < afrench> dm-more is meant to be a pseudo-gem....if you do `gem install dm-more` you get all of the gems contained within it....dm-more itself doesn't do anything
19:55 < afrench> just a way of packaging up other gems
19:56 < Stjernstrom> I do not know how it works, but do you not specify what gems is dependent in specifications/*.gemspec fil and then gem install everything specified in that file ?
19:58 < Stjernstrom> This is my gemspec for dm-more
http://pastie.textmate.org/204887 and i thought that if i removed the last line, the dependecy where gone?
20:04 < benburkert> is STI working with automigrations?
20:28 < FrihD> hello
20:32 < namelessjon> Hi. Very quick question: How do I use and/or disable the log file?
20:32 < namelessjon> At the moment (on 0.9.0.1) I get a dm.log filled with lots of 'log created' messages and nothing else.
21:01 < myobie> can datamapper be installed on windows?
21:01 < myobie> namelessjon: not at this time, it's a known bug
21:04 < namelessjon> myobie: Okay, thanks for letting me know
21:15 < advany> so, this weekend I have a couple of hours to spare, I though I would do some documenting... shall I just start with core public api stuff?
21:25 < dkubb> advany: I'd say it's a good idea to document the stuff that people use regularly first: so Property, Resource, Repository, Associations
21:26 < advany> dkubb: k, thnx!
21:26 < dkubb> advany: I'm sure there's more than this, I just pulled this off the top of my head
21:26 < dkubb> advany: there are things that are sort of internal, like Scope.. which I suppose someday should be documented, but the number of people who will use it is alot smaller
21:26 < advany> dkubb: I just go thru the files of core.. after those you mentioned...
21:27 < advany> Having some problems with soring, I create 4 objects (they get the id's 1, 2, 3,4) but when I retrieve them, they are ordered weird (and there are double items)
21:27 < advany>
http://pastie.caboo.se/20495421:28 < advany> it gives me back items 4, 2,3, 4
21:28 < advany> no idea why 1 is replaced by 4...
21:29 < advany> I am checking the code... but last item always replaces the first.. somehow :-)
21:31 < dkubb> advany: I think there may be something screwy with Collection#inspect. Try this instead: Item.all(:order => [:created_at.desc]).map { |i|
i.id }
21:31 < dkubb> advany: I just want to see if the actual order is different from what is expected
21:32 < advany> dkubb: => [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
21:32 < advany> that works perfectly!
21:32 < dkubb> advany: actually the problem isn't Collection#inspect itself, it is due to how Resource#inspect works, and ultimately how Collection#reload does its thing
21:32 < dkubb> advany: great
21:34 < advany> dkubb: aaah, k, strange behavior, should be spec'd :-) might do that tomorrow and if nobody has fixed it, maybe fix it myself
21:34 < dkubb> advany: in a nutshell Resource#inspect shows the value of every attribute, even those that are not loaded.. requiring a lazy load. the parent Collection reloads every resource within itself with the lazy attributes, but it doesn't (yet) know how to preserve its ordering when it replaces itself with the newly reloaded resources. So in the middle of the Collection#inspect call, the Collection is re-ordered
21:35 < dkubb> advany: causing unexpected and weird results
21:36 < advany> dkubb: aaah, I do understand! but lots of undocumented code... see if I can figure out how it works internally
21:36 < dkubb> advany: try that trick with with map() with a lazy field and you'll see what I mean
21:36 < advany> dkubb: I will tomorrow :-) got to go... appointment in 30 minutes.. and I am already to late... :P
21:37 < dkubb> advany: np
21:37 < advany> dkubb: thnx for explaining! helps with inside knowledge of DM
21:37 < dkubb> advany: as soon as Collection knows how to maintain it's ordering, this problem will go away. There's already a ticket about it
21:38 < advany> dkubb: aaah k! great
21:38 < ssmoot> dkubb: that's kinda weird... we didn't have that issue in DM3. Seems like some tweaking in Collection#load should take care of it.
21:38 < ssmoot> I'll dive in. :)
21:39 < dkubb> ssmoot: Collection needs to remember the query it was constructed with, so when in Collection#reload() when it replaces itself with the new copies of the resources, it can ensure they are ordered the same
21:40 < ssmoot> dkubb: I agree with the first part. Long term it's necessary for all the stuff we want to do. I'm not so sure it's necessary to re-add objects to the set though when reloading, so we shouldn't have this issue either way.
21:40 < ssmoot> I'll try to make a failing spec real quick...
21:42 < dkubb> ssmoot: it should probably possible to fix this specific problem without replacing he collection during reload
21:42 < dkubb> ssmoot: there are quite a few other problems that can be solved with this approach
21:43 < myobie> ssmoot: does dm build on windows currently? if so, what are the requirements?
21:43 < dkubb> ssmoot: and if you don't replace the collection, and the underlying data changes (something is deleted, etc), then the Collection won't reflect the actual data properly
21:44 < ssmoot> myobie: Luis sayeth no. We need to tweak our datetime parsing a bit.
21:44 < dkubb> ssmoot: another case is if the data the ordering is based on (say updated_at) changes with the underlying data, the resource objects in the collection will not be in the correct order. That was the original purpose for replacing the Collection with the new data
21:44 < afrench> so....linkinus is impressive
21:45 < ssmoot> dkubb: but updating a record and having the updated_at sorting apply only on a reload seems non-intuitive and hard to predict as well.
21:45 < jayme> I've got a quick question, does this look familiar to anyone? "uninitialized constant DataMapper::Base - (NameError)"
21:46 < dkubb> ssmoot: so reload really isn't a reloading of the collection.. perhaps it should be renamed something else, like refresh or something..
21:46 < dkubb> ssmoot: giving it the name reload() implies that you really are reloading the whole collection from the data source, order and all
21:46 < afrench> jayme: yeah...you get that when your running 0.3 code on DM 0.9
21:46 < jayme> is DataMapper::Base no longer part of the code?
21:46 < ssmoot> dkubb: good point. Hmm...
21:47 < dkubb> ssmoot: it's really "reload_each_resource" or something.. gotta have a better name than that :)
21:47 < ssmoot> jayme:
http://datamapper.org/articles/datamapper_090_released.html21:47 < afrench> jayme: correct, it's been replaced with `include DataMapper::Resource`
21:47 < ssmoot> dkubb: how about just #load_fields! ?
21:47 < myobie> ssmoot: ah, is there a work around or is it completely broken?
21:48 < jayme> thanks :)
21:48 < dkubb> ssmoot: sure, works for me. That's mostly an private method anyway (private in the sense that people shouldn't be calling it directly)
21:48 < dkubb> ssmoot: later when Collection knows about it's query we could make a real Collection#reload, provided there is a use case
21:49 < dkubb> ssmoot: even #reload_fields could work
21:49 < ssmoot> myobie: well... you could work around it if you know C... ;) We'll have it fixed up RSN. Bernerd will be joining the Wieck crew June 1st, so his first week on-board will be fixing up a few DO tidbits if no one else tackles them first.
21:49 < ssmoot> dkubb: yeah, k, I agree with the naming... will go with that.
21:49 < dkubb> ssmoot: kk
21:50 < afrench> I must find out how to turn off graphical smilies
21:54 < myobie> ssmoot: ok. thanx for the hard work
22:05 * ssmoot stabs ScottBauer_
22:06 < ScottBauer_> ssmoot: get to work
22:42 < ssmoot> down to 25 failing specs getting Collection#query to work...
22:43 < ssmoot> It was kinda neat seeing ~300 failures at first and whittling them down with a small change here and there. ;)
22:46 < Frost> mm... progress :)
23:05 < GitHub117> dm-more: Dan Kubb master SHA1-16989cf
23:05 < GitHub117> Updated version numbers to 0.9.1
23:05 < GitHub117>
http://github.com/sam/dm-more/commit/16989cfb08060b6d5dd02599430d7c043c8ae43523:06 < ssmoot> 8 failures...
23:07 < ssmoot> dkubb: ^^^ adding Collection#query and changed Collection#initialize from (repository, model...) to (query...)
23:07 < ssmoot> dkubb: started out with like 300 failures. :D
23:09 < GitHub83> do: Dan Kubb master SHA1-5bdb238
23:09 < GitHub83> Updated version numbers to 0.9.1
23:09 < GitHub83>
http://github.com/sam/do/commit/5bdb2384ce9c388d2ad7dbb002592c50c11d973823:12 < dkubb> ssmoot: nice.. and I like the simplification in Collection#initialize. I figure why bother to pass in information that the Query object is support to encapsulate. It just creates a more complex API, and makes it more likely for bugs to occur
23:13 < ssmoot> dkubb: right. so I got rid of a few of the places that passed repository, model instead of just query.
23:14 < dkubb> ssmoot: I've got a simplified adapter API mock-up I've been messing around with the last few days that works the same way
23:14 < dkubb> ssmoot: in alot of cases model/repository are redundant if they can be derived from other arguments to the method
23:14 < ssmoot> dkubb: and DOA#read isn't used anymore. Repository#get calls #read_set. Eventually we may want to go back and optimize that, but since #read didn't support scoping and such anyways, it really needed to go away until it could be done right.
23:15 < dkubb> ssmoot: I know in some cases we could get extra performance from having a read_set and a read_one type method, but after some thought I don't know if it's big enough for the redundancy.. I would prefer to just have one read-type method, and optimize it to be super fast
23:16 < ssmoot> dkubb: in fact, I think long term we might just rename #read_set to #read and not have more than one. There'll be a big local performance hit for that, but a very small hit in application scope since a #get is used so infrequently. It'd probably just show up as noise on an application benchmark level.
23:16 < ssmoot> dkubb: agreed.
23:16 < dkubb> ssmoot: heh, we said basically the same thing :)
23:16 < ssmoot> dkubb: embracing constraints and all that... if we're constrained to a single interface, then that'll hopefully pay off to make everything faster. :)
23:17 < dkubb> ssmoot: here is the adapter API I've been thinking about:
http://pastie.org/private/kzymgtywhmfvhtkhs62sog23:18 < antares> dkubb: what is the best way to get list of associations? I want to add associations include and other options to serialization methods
23:18 < dkubb> ssmoot: since alot of it is based on receiving query objects, it can allow bulk updates/deletes
23:18 < Frost> dkubb:
http://wm.lighthouseapp.com/projects/4819-datamapper/tickets/318-datamapper-collection-not-responding-to-group_by-in-0-9-0-1#ticket-318-1 <-- if you wanted a reminder ;)
23:18 < dkubb> antares: do you want to reflect on the model's associations, or find out which associations a resource has?
23:18 < ssmoot> dkubb: nice interface.
23:18 < dkubb> Frost: thanks for the heads up
23:18 < dkubb> ssmoot: thank you :)
23:18 < Frost> np
23:19 < antares> dkubb: just list of associations resource has. But knowing how to reflect is another thing I do not know how to do :) just point me to the source
23:19 < ssmoot> Frost: dkubb: we'll add #group_by to extlib.
23:20 < Frost> ssmoot: thanks :)
23:20 < dkubb> antares: resource.child_associations and resource.parent_associations will give you all the current association objects attached to the resource
23:20 < bcg> Does datamapper have a way to differentiate the SQL it outputs by the version of the database the adapter is connecting to? Currently datamapper assumes postgresql 8.1 supports DROP TABLE IF EXISTS ... which doesn't show up until 8.2.
23:20 < antares> dkubb: ty
23:20 < dkubb> antares: to reflect on the associations a model has, look in model.relationships (defined in DataMapper::Associations)
23:21 < dkubb> antares: BTW: model == resource.class
23:21 < ssmoot> bcg: It could easily, but we use RETURNING for serial keys, so it's not 8.1 compatible yet.
23:21 < antares> dkubb: I realize that, thanks
23:22 < dkubb> ssmoot: how would we make it 8.1 compatible and still have serial keys? do we have to do a SELECT after the insert to get the key?
23:23 < bcg> ssmoot: ah, so there are a number of issues with supporting 8.1 then? probably best to upgrade then I suppose
23:23 < ssmoot> dkubb: or before and within a transaction like AR.
23:24 < dkubb> ssmoot: oh, I see.. get the id directly from the sequence, and then use that in the INSERT
23:24 < ssmoot> bcg: there are a few small ones, but we're probably talking about 20 lines of code max. It's not insurmountable by any means. We've just had other priorities.
23:24 < dkubb> ssmoot: yeah, that's probably a better approach anyway. how would that work if we're already inside a transaction? does postgres support nested transactions?
23:24 < ssmoot> dkubb: right.
23:25 < ssmoot> dkubb: dunno. we can check if we're already in a transaction tho', in which case we know the ops will happen serially anyways right?
23:25 < antares> dkubb: I have an idea of testing to_json not by comparing strings, but by deserializing serialized form back again -- what do you think, is it reasonable?
23:25 < dkubb> ssmoot: yeah I guess.. come to think of it, it probably don't make much of a diff either way
23:26 < dkubb> antares: yeah, that could work fine
23:26 < antares> dkubb: comparing strings not only error prone and painful, it makes testing of edge cases hard.
23:26 < antares> dkubb: ok, making this change then
23:26 < dkubb> antares: as long as you trust the deserialization method.. like if it's done with a fairly standard lib
23:26 < dkubb> antares: I got you. Plus whitespace differences and stuff are a pain
23:27 < dkubb> antares: I'd be wary if you hacked up your own deserialization method.. but if you're using the standard YAML or JSON libs, then either should be fine
23:27 < dkubb> antares: come to think of it, to_xml would be nicely tested this way too
23:28 < antares> dkubb: sure, I am going to use json gem, yaml from stdlib and hpricot
23:28 < antares> dkubb: yeah, and yaml, too
23:28 < dkubb> antares: sounds good. if anything's in rubygems, just make sure to set the dependencies in the Rakefile
23:29 < antares> dkubb: we already depend on json and faster csv, only hpricot will be added probably
23:29 < dkubb> antares: kk
23:30 < ssmoot>
http://pastie.textmate.org/private/vhvdzvltkip8segsktpw6q23:30 < ssmoot> dkubb: ^^^ all kinds of mocking and stubbing voodoo I must battle now :(
23:31 < dkubb> ssmoot: yeah I know. that's one of the pains of using mocks/stubs. I'm always trying different things to try to solve this
23:32 < ssmoot> dkubb: well, that, and I killed find_by_sql ;)
23:32 < dkubb> ssmoot: I would recommend using kind_of? instead of === where the Spec::Mocks::Mock stuff is blowing up. I could not find a way to make a mock object respond to === properlly
23:32 < dkubb> ssmoot: you removed it?
23:32 < ssmoot> dkubb: I commented it out while working on this since I didn't know what to do with it now that Collection requires a Query.
23:32 < ssmoot> dkubb: not saying that's permament... just a pain.
23:33 < dkubb> ssmoot: I'm fine with that
23:33 < dkubb> bbiab
23:33 < afrench> ssmoot: would it be wise to release 0.9.1 tonight or should I wait on that till later?
23:33 < afrench> wycats _really_ wants a beta release that installs cleanly by RailsConf
23:33 < ssmoot> afrench: tonight definitely. gotta be able to install with the rakefiles and such at least.
23:34 < afrench> ok
23:34 < afrench> after I get this database sync going, I'll have about 20mins to kill while it does its thing.....I'll switch over to dm then and make 0.9.1 a reality
23:35 < ssmoot> afrench: spiffy
23:51 < jeckel> ssmoot: what are you thoughts for extlib
23:52 < jeckel> what types of extensions
23:53 < ssmoot> jeckel: basically activesupport or facets "light". Enumerable extensions are a gimmie, but otherwise I'm not looking to duplicate functionality you can find in those other libraries necessarily.
23:53 * afrench working on 0.9.1
23:55 < jeckel> ssmoot: so basically class extensions mostly for ruby
23:56 < jeckel> i have something similar I work on here and there, here:
http://github.com/revans/extensions/tree/master/lib/extensions23:57 < jeckel> not much there yet, but just some extensions for things as I need them, framework independent
23:58 < ssmoot> jeckel: kinda, except more for stuff that might be used by DM internals. Like Inflection.
--- Log closed Thu May 29 00:00:28 2008