solnic changed the topic of #rom-rb to: Ruby Object Mapper | Mailing List: https://groups.google.com/forum/?fromgroups#!forum/rom-rb | Logs: http://irclog.whitequark.org/rom-rb
zekefast has joined #rom-rb
<dkubb> that actually describes how he laid out mutant
<dkubb> that's how I designed yardstick too
<dkubb> 95% of the code handles the domain, and there's a tiny part that handles the CLI and delegates the arguments to the programmatic libs
<dkubb> it's much easier to test because most of the code is not UI specific
snusnu has quit [Quit: Leaving.]
zekefast has quit [Quit: Leaving.]
postmodern has joined #rom-rb
jfredett-w has quit [Read error: Connection reset by peer]
jfredett-w has joined #rom-rb
travis-ci has joined #rom-rb
<travis-ci> [travis-ci] dkubb/axiom-sql-generator#10 (master - ec642c0 : Dan Kubb): The build was broken.
travis-ci has left #rom-rb [#rom-rb]
mbj has joined #rom-rb
travis-ci has joined #rom-rb
<travis-ci> [travis-ci] dkubb/axiom-sql-generator#11 (master - e95c5bd : Dan Kubb): The build was broken.
travis-ci has left #rom-rb [#rom-rb]
mbj has quit [Ping timeout: 246 seconds]
mbj has joined #rom-rb
skade has joined #rom-rb
dkubb has quit [Ping timeout: 252 seconds]
dkubb has joined #rom-rb
dkubb|away has joined #rom-rb
dkubb has quit [Read error: Connection reset by peer]
mbj has quit [Ping timeout: 272 seconds]
skade has quit [Quit: Computer has gone to sleep.]
mbj has joined #rom-rb
mkristian has joined #rom-rb
skade has joined #rom-rb
skade has quit [Ping timeout: 260 seconds]
skade has joined #rom-rb
mkristian has quit [Ping timeout: 265 seconds]
zekefast has joined #rom-rb
mkristian has joined #rom-rb
postmodern has quit [Quit: Leaving]
postmodern has joined #rom-rb
mkristian has quit [Ping timeout: 248 seconds]
snusnu has joined #rom-rb
mkristian has joined #rom-rb
snusnu has quit [Quit: Leaving.]
postmodern has quit [Quit: Leaving]
breakingthings has joined #rom-rb
CraigBuchek has joined #rom-rb
snusnu has joined #rom-rb
CraigBuchek has quit [Quit: CraigBuchek]
zekefast has quit [Quit: Leaving.]
zekefast has joined #rom-rb
zekefast has quit [Quit: Leaving.]
zekefast has joined #rom-rb
zekefast has quit [Quit: Leaving.]
zekefast has joined #rom-rb
zekefast has quit [Quit: Leaving.]
<dkubb|away> good morning
dkubb|away is now known as dkubb
<mbj> dkubb: hola
<solnic> morning
dkubb has quit [Quit: Linkinus - http://linkinus.com]
dkubb has joined #rom-rb
cored has joined #rom-rb
mkristian has quit [Quit: bye]
skade has quit [Quit: Computer has gone to sleep.]
<mbj> solnic: have to run, cu later
mbj has quit [Quit: leaving]
jfredett-w has quit [Read error: Connection reset by peer]
jfredett-w has joined #rom-rb
jfredett-w has quit [Read error: Connection reset by peer]
snusnu has quit [Quit: Leaving.]
jfredett-w has joined #rom-rb
snusnu has joined #rom-rb
CraigBuchek has joined #rom-rb
skade has joined #rom-rb
breakingthings has quit []
breakingthings has joined #rom-rb
NemesisD has joined #rom-rb
<NemesisD> i've got a custom type in a virtus object and i need to define a coercer for it that can optionally take a hash. what's the "right" way to do this? the coercible api does not look like it was meant to be extended to handle non "primitive" types
dkubb has quit [Quit: Linkinus - http://linkinus.com]
dkubb has joined #rom-rb
mbj has joined #rom-rb
dkubb has quit [Read error: Connection reset by peer]
dkubb has joined #rom-rb
jfredett-w has quit [Read error: Connection reset by peer]
jfredett-w has joined #rom-rb
<dkubb> I would love to see triage turn into something that instead of shelling out, wraps the tool and parses the output
<dkubb> so we can do nicer things with it besides just displaying it
<dkubb> parsing output doesn't necessarily mean parsing stdout, although it could with some tools that are completely CLI driven.. I would much rather see them using the libs directly and using the "response objects"
<mbj> dkubb: I do the "direct call to the thing that parses ARGV" for some other reasons already.
<mbj> dkubb: I'm under jruby / windows, and I dont have a stable setup for Kernel.system and firends.
<mbj> dkubb: Also jruby spinup is very expensive. I can bring some of the knowlege bak to triage. For mutant I'm calling in-proces for ages already.
skade has quit [Quit: Computer has gone to sleep.]
<mbj> dkubb: BTW hooking rake is very very dirty. You have to modify global ARGV :(, you cannot pass your own.
skade has joined #rom-rb
<mbj> dkubb: I hate ruby tools playing the "I'll never be called from someone else, I'm the top pf the stack"
<mbj> written as more public record here. https://twitter.com/_m_b_j_/status/389847067771682816
<dkubb> there is the args.extras stuff
<dkubb> task :name do |task, args| ... end
<dkubb> you can call it with: rake mytask[1,2,3,4,5,6]
<dkubb> replacing the numbers with the arguments
<dkubb> but yeah, it's annoying when things cannot possibly imagine being run by something else
<dkubb> even a rake task gets run inside shell scripts or by capistrano
<dkubb> a pet peeve of mine is when proper exit codes aren't used because the assumption is that it'll always be run interactively
<dkubb> as well as the obvious, not making the output pipe-able.. dumping everything in stdout instead of separating stderr and stdout
mbj has quit [Ping timeout: 272 seconds]
bf4 has joined #rom-rb
CraigBuchek has quit [Quit: CraigBuchek]
<NemesisD> dkubb: how does one create a custom coercer? i need to upconvert hashes into domain objects in a virtus model
<NemesisD> the examples in virtus show you can override coerce but that seems like it leaks because the "coercer" method is still used to determine success. but i realized there's no clear directions for how to write a custom coercer
<NemesisD> i guess i should probably direct this at solnic instead since it's his library lol
mbj has joined #rom-rb
zekefast has joined #rom-rb
<dkubb> NemesisD: yeah, I dunno. I don't really use virtus atm. your guess is as good as mine right now
<dkubb> I would maybe check the specs to see how it does things
<dkubb> or read through the code, searching for "coerce"
<NemesisD> for the time being i'm just stuffing it into a .parse class method. overriding the coercers seems a bit hairy atm
<mbj> dkubb: I missed your args comment. And I have to say I knew it.
<mbj> dkubb: But imagine you are running some kind of a build script you run from a maven environment.
<mbj> dkubb: So you have to start a jruby interpreter and get a ruby environment.
<mbj> dkubb: Now you wanna call a rake task, with exactly the CLI behavior (as you'd normally do via shelling out), but we cannt for spinup and windows reasons (I'd not choose windows :D)
<mbj> dkubb: Some of the ruby tools simply dont have the chance to run the CLI via your own ARGV
<mbj> dkubb: And forget, I already sovled this :D
<mbj> dkubb: Full blame on me :D, its actually very easy.
<mbj> dkubb: But all ruby tools with clis should offer: existatus = Tool::CLI.run(%w(my --own ARGV here))
<mbj> dkubb: Rake doesnt, but should.
martxel has quit [Quit: WeeChat 0.4.1]
<jfredett-w> mbj: I'd much prefer all ruby tools w/ a cli provide an API to their actual domain model...
mbj has quit [Read error: Connection reset by peer]
<jfredett-w> that, of course, predicates that every CLI tool _have_ a domain model worth hooking into. :)
breakingthings has quit []
cored has quit [Ping timeout: 240 seconds]
cored has joined #rom-rb
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
martxel has joined #rom-rb
martxel has joined #rom-rb
postmodern has joined #rom-rb
<dkubb> jfredett-w: I like it when tools provide the Tool::CLI interface that mbj outlined, so that you can just do: exit Tool::CLI.run(%w(my --own ARGV here)) .. but I agree there *should* be something even lower level that I can get to if I want