dkubb changed the topic of #datamapper to: Datamapper v1.2.0 | Mailing List: http://is.gd/aa9D | Logs: http://is.gd/qWAL7V | DataMapper 2 Renamed to ROM, see #rom-rb for development
<jordanyee> Does any one know what the proper term for doing this is?
<jordanyee> Album.create( title: 'Foo', artist: { firstname: 'Foo', lastname: 'Bar' } )
<jordanyee> Where Album has a has 1 association to Artist?
<jordanyee> It's like a nested create or something?
<mbj> jordanyee: Embedded value?
<jordanyee> I'm not sure, is that a guess as well? : P
<mbj> jordanyee: Depends what you mean exactly.
<jordanyee> I've found that I can use the single line of code above instead of:
mbj has quit [Quit: leaving]
mbj has joined #datamapper
<jordanyee> a = Album.create( title: 'Foo' ); Album.artist = Artist.create( firstname: 'Foo', lastname: 'Bar' ); a.save
<mbj> jordanyee: gootta go to sleep sorry
<jordanyee> I'm just wondering if there's a proper technical name for doing it all in one line of code
<jordanyee> Oh okay, cool, night!
<mbj> jordanyee: deep mass assignment with coercion to associated resource?
<mbj> technical term idea :D
<mbj> cu
mbj has quit [Client Quit]
<dkubb> yeah, I added that but I don't recall ever giving it a name
<dkubb> it also works with the same syntax for querying
<dkubb> so like .all and .first
<jordanyee> Oh awesome. Yeah, it's a great feature to cut down on the amount of code needed
<jordanyee> I've found that when using it though, validation doesn't seem to happen on associated models
<dkubb> yeah, I'm not sure if dm-validations would recurse or not
<jordanyee> In the nested model, a property with :required => true, happily gets created with a null value if a nil is passed
<jordanyee> Oh okay
<dkubb> I would dig into dm-validations and see if there's something you can use. I believe there is something that allows you to validate the associations, but I can't recall
<jordanyee> Alright, I'll dig into that
g0bl1n has quit [Ping timeout: 246 seconds]
<jordanyee> dkubb: Looks like there's an open pull request that adds validation of associations
<jordanyee> Is there anything I can do to help that get merged?
brianpWins has quit [Quit: brianpWins]
<dkubb> jordanyee: if you want to create a new PR with those changes and make sure it applies against release-1.2, and that travis passes, I'll merge it
<dkubb> you may need to bug me a bit on IRC though because I don't really monitor the DM issue tracker anymore
<jordanyee> dkubb: I'm new to contributing to a large project like this. Could you point me to a guide on how I would test that a PR works against the current 1.2 release? I also haven't worked with travis before... :S
<dkubb> jordanyee: what you can do is pull down the current release 1.2 branch, and then add xshay's branch as a remote via git, and merge it into the release 1.2 branch, then run the tests locally
<dkubb> jordanyee: assuming they pass, fork dm-validations on github, log into travis with your github account and add the repo to the list of repos you want tested. then push your branch to your github fork. the tests should be triggered
<dkubb> assuming it all passes, open up a PR and then ping me here
<dkubb> it sounds worse than I've explained it ;)
<dkubb> er I mean, it sounds bad, but it's not really too bad
<dkubb> it requires a bit of git knowledge. you'll need to learn how to push/pull/add remotes/merge
<jordanyee> Okay, it took a few reads through, but I think I can handle that
<jordanyee> Here goes...
siplux has joined #datamapper
brianpWins has joined #datamapper
<jordanyee> dkubb: I've got the branches merged -- had to do a bit of research.
<jordanyee> What command do I use to run the tests? I'm not familiar with the way the tests are set up here
<jordanyee> It should be rake spec, right?
<jordanyee> I keep getting this error despite having installed RSpec
<jordanyee> rspec is not available. In order to run spec, you must: gem install rspec
<jordanyee> Oh I have RSpec 2.14 installed instead of 1.3.2
lfox has quit [Quit: ZZZzzz…]
zombor has quit [Remote host closed the connection]
<jordanyee> dkubb: Got everything sorted, just waiting for Travis to run the tests. I'll ping you when it's good
<jordanyee> Hope I did everything correctly. Let me know if you need me to make any fixes
<dkubb> jordanyee: there's two things I noticed
<dkubb> jordanyee: note that you're asking me to merge it into master, but you want to have it merged into release-1.2
<dkubb> jordanyee: the other thing is that travis didn't run your test, so I think you need to go into travis to set your fork as testable.. from your account settings you run the "sync" command, then turn on travis for the repo
zombor has joined #datamapper
<dkubb> jordanyee: oh, one other thing, I presume you added your branch to your app's Gemfile to confirm the fix actually solves your problem?
<dkubb> it's one thing to use an existing PR, and xshay's stuff is pretty solid, but you may want to confirm it works for your case
<jordanyee> Oh no, I haven't actually
zombor has quit [Ping timeout: 250 seconds]
<jordanyee> Okay, well, first things first, I'll fix the pull request to release-1.2 when I resubmit it
<dkubb> cool
<jordanyee> Second, I think Travis did run the test
<dkubb> yeah, release-1.2 is what we're maintaining. it'll take some effort to reconcile the work on the master branch wit the stable stuff
<dkubb> oh yeah? I guess I just expected the little icon next to the commit in the PR
<jordanyee> I'm trying to find a link
<dkubb> ahh yeah. that looks like it ran against the master branch
postmodern has quit [Quit: Leaving]
<jordanyee> Oh
<dkubb> when you merge xshay's stuff onto release-1.2, push it to a newly named branch and it should run the tests with that
<dkubb> oh wait, one sec. lemme check something
<dkubb> I think when it was setup, it was configured to only run against specific branches
<jordanyee> Hmm, okay
<dkubb> I would probably recommend removing this from your branch: https://github.com/jordanyee/dm-validations/blob/release-1.2/.travis.yml#L2-L4
<dkubb> then it should run everything
<dkubb> I hope anyway. I haven't done very much with the new travis config
<jordanyee> Okay, we'll see shortly
<jordanyee> Shall I remove those lines or just comment them out? Does it matter?
<dkubb> I don't think it matters
<dkubb> we've got git, so the data isn't lost
<jordanyee> Yup, okay
<jordanyee> Now, how do I test the branch locally?
<jordanyee> Oh never mind, got it. Just had to add a local path to the gem.
<jordanyee> Hahaha, as it turns out the branch doesn't work for me
<jordanyee> Oh man, it's too late for this... Thanks for the help tonight dkubb!
<dkubb> no worries, good night
jordanyee has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jordanyee has joined #datamapper
postmodern has joined #datamapper
jordanyee has quit [Client Quit]
mikecmpbll has joined #datamapper
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mikecmpbll has joined #datamapper
postmodern has quit [Quit: Leaving]
Frost has quit [Ping timeout: 272 seconds]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Frost has joined #datamapper
mikecmpbll has joined #datamapper
mbj has joined #datamapper
zombor has joined #datamapper
akasper has joined #datamapper
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
zombor has quit [Read error: Connection reset by peer]
zombor has joined #datamapper
skade has joined #datamapper
jordanyee has joined #datamapper
skade has quit [Quit: Computer has gone to sleep.]
mikecmpbll has joined #datamapper
mbj has quit [Quit: leaving]
g0bl1n has joined #datamapper
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
g0bl1n has quit [Ping timeout: 246 seconds]
brianpWins has quit [Quit: brianpWins]
dkind has joined #datamapper
<dkind> anyone on?
dkind has quit [Quit: Page closed]
Eiam_ has joined #datamapper
Eiam has quit [Ping timeout: 260 seconds]
brianpWins has joined #datamapper
lfox has joined #datamapper
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
mbj has joined #datamapper
mbj has quit [Ping timeout: 246 seconds]
mbj has joined #datamapper
postmodern has joined #datamapper
Eiam has joined #datamapper
mbj has quit [Ping timeout: 240 seconds]
mbj has joined #datamapper
mbj has quit [Ping timeout: 246 seconds]
mbj has joined #datamapper
mbj has quit [Ping timeout: 240 seconds]
mbj has joined #datamapper
lfox has quit [Quit: ZZZzzz…]
railsnewbie has joined #datamapper
<railsnewbie> Does datamapper work with ruby 1.9.3 and rails 3.2.13? Will it work with ruby 2 and rails 4?
railsnewbie has quit [Quit: Page closed]
lfox has joined #datamapper
akasper has quit [Quit: Leaving.]
mbj has quit [Ping timeout: 250 seconds]
mbj has joined #datamapper
mbj_ has joined #datamapper
mbj has quit [Read error: Connection reset by peer]
zombor has quit [Remote host closed the connection]
skade has joined #datamapper
mbj_ is now known as mbj
jordanyee has quit [Quit: Textual IRC Client: www.textualapp.com]
jordanyee has joined #datamapper
mbj has quit [Read error: Connection reset by peer]
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
mbj has joined #datamapper
lfox has quit [Quit: ZZZzzz…]