<billybob00>
i know there's probably a better way of doing this
<womble>
I'm sure we'll let you know.
<womble>
billybob00: Stick a return at the beginning of line 4
<womble>
If you only want to return if the find_task on line 4 actually finds something, then you can do (t = find_task(suite_action['Actions'], id)) && return t
<bnagy>
:<
<billybob00>
ahhhhhh
<billybob00>
thank you so much!!!
<womble>
bnagy: You disapprove of my approach?
<bnagy>
yeah I don't like && logic one-liners
<womble>
Well, you can turn it into an if instead if you like: return t if t = find_task(...)
RickHull has joined #ruby-lang
<bnagy>
much nicer :)
<womble>
bnagy: Been writing too much bash lately...
arooni-mobile has quit [Ping timeout: 256 seconds]
fujimura has joined #ruby-lang
caseypatrickdris has joined #ruby-lang
wallerdev has joined #ruby-lang
arooni-mobile has joined #ruby-lang
fujimura has quit [Ping timeout: 250 seconds]
djbkd has joined #ruby-lang
kuroro has left #ruby-lang ["Leaving"]
charliesome has joined #ruby-lang
billybob00 has quit [Ping timeout: 246 seconds]
baweaver has joined #ruby-lang
<womble>
There's a space in there that there probably shouldn't be.
<womble>
Although even correcting that, I'm still getting a 404 on that URL.
<tui>
womble: thanks yeah that cut off from the powershell output. thanks
djbkd has quit [Remote host closed the connection]
hahuang61 has joined #ruby-lang
datanoise has joined #ruby-lang
revath has joined #ruby-lang
hahuang61 has quit [Ping timeout: 244 seconds]
revath1 has joined #ruby-lang
revath has quit [Ping timeout: 272 seconds]
fujimura has joined #ruby-lang
Musashi007 has joined #ruby-lang
workmad3 has joined #ruby-lang
xcesariox has joined #ruby-lang
Musashi007 has quit [Client Quit]
workmad3 has quit [Ping timeout: 252 seconds]
cornerma1 has joined #ruby-lang
cornerman has quit [Ping timeout: 256 seconds]
cornerma1 is now known as cornerman
stardiviner has quit [Quit: Weird in coding now, or make love, only two things push me away from IRC.]
|jemc| has joined #ruby-lang
tui has quit [Quit: Page closed]
cubicme has joined #ruby-lang
caseypatrickdris has quit [Remote host closed the connection]
cubicme has quit [Client Quit]
cubicme has joined #ruby-lang
revath1 has quit [Ping timeout: 256 seconds]
sepp2k has joined #ruby-lang
joaomdmoura has joined #ruby-lang
revath has joined #ruby-lang
joaomdmo_ has quit [Read error: Connection reset by peer]
havenwood has joined #ruby-lang
hahuang61 has joined #ruby-lang
hahuang61 has quit [Ping timeout: 240 seconds]
revath1 has joined #ruby-lang
datanoise has quit [Quit: leaving]
revath has quit [Ping timeout: 264 seconds]
AmirolAhmad has quit [Remote host closed the connection]
fujimura has quit [Remote host closed the connection]
fujimura has joined #ruby-lang
bruno- has joined #ruby-lang
chinmay_dd has joined #ruby-lang
konsolebox has quit [Ping timeout: 246 seconds]
konsolebox has joined #ruby-lang
bruno- has quit [Ping timeout: 272 seconds]
kerunaru has joined #ruby-lang
fusillicode has quit [Ping timeout: 265 seconds]
arooni-mobile has quit [Ping timeout: 256 seconds]
riotjones has joined #ruby-lang
|jemc| has quit [Ping timeout: 258 seconds]
xcesariox has quit [Remote host closed the connection]
micmus has quit [Ping timeout: 264 seconds]
jas02 has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
_ht has joined #ruby-lang
conanza has joined #ruby-lang
conanza has quit [Client Quit]
revath1 has quit [Ping timeout: 244 seconds]
revath has joined #ruby-lang
hahuang61 has joined #ruby-lang
arBmind has joined #ruby-lang
fedexo has joined #ruby-lang
hahuang61 has quit [Ping timeout: 258 seconds]
revath has quit [Read error: No route to host]
revath has joined #ruby-lang
AmirolAhmad has joined #ruby-lang
kerunaru has quit [Read error: No route to host]
ta has joined #ruby-lang
ledestin has joined #ruby-lang
joaomdmoura has quit [Remote host closed the connection]
michael_mbp has quit [Excess Flood]
fujimura has quit [Remote host closed the connection]
ta has quit [Remote host closed the connection]
michael_mbp has joined #ruby-lang
joaomdmoura has joined #ruby-lang
Guest24 is now known as lele_
chadwtaylor has quit [Remote host closed the connection]
Ilyes512 has joined #ruby-lang
kwd has quit [Quit: I'm using a Free IRC Bouncer from BNC4FREE - http://bnc4free.com/]
kwd has joined #ruby-lang
Iskarlar has joined #ruby-lang
jas02 has quit [Quit: jas02]
Forgetful_Lion has joined #ruby-lang
pyo_ has joined #ruby-lang
kerunaru has joined #ruby-lang
fujimura has joined #ruby-lang
pyo_ has quit [Read error: Connection reset by peer]
baweaver has quit [Remote host closed the connection]
joaomdmoura has quit [Remote host closed the connection]
ta has joined #ruby-lang
ta has quit [Remote host closed the connection]
dhjondoh has joined #ruby-lang
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Iskarlar has joined #ruby-lang
AmirolAhmad has quit []
symm- has quit [Ping timeout: 265 seconds]
stdtnt_ has joined #ruby-lang
stdtnt_ has quit [Client Quit]
GBrawl has joined #ruby-lang
stdtnt has joined #ruby-lang
jas02 has joined #ruby-lang
benlovell has joined #ruby-lang
k3asd` has joined #ruby-lang
hahuang61 has joined #ruby-lang
joaomdmoura has joined #ruby-lang
elia has joined #ruby-lang
hahuang61 has quit [Ping timeout: 258 seconds]
kerunaru has quit [Read error: Connection reset by peer]
ur5us has quit []
solars has joined #ruby-lang
ledestin has quit [Ping timeout: 246 seconds]
tomaz_b has joined #ruby-lang
kerunaru has joined #ruby-lang
allomov has joined #ruby-lang
charliesome has quit [Quit: zzz]
bruno- has joined #ruby-lang
pyo_ has joined #ruby-lang
ta has joined #ruby-lang
k3asd` has quit [Quit: leaving]
k3asd` has joined #ruby-lang
GBrawl has quit [Ping timeout: 276 seconds]
bruno- has quit [Ping timeout: 265 seconds]
VinnyBoy has quit [Read error: Connection reset by peer]
fusillicode has joined #ruby-lang
kerunaru has quit [Max SendQ exceeded]
kerunaru has joined #ruby-lang
fedexo has quit [Ping timeout: 265 seconds]
joaomdmoura has quit [Remote host closed the connection]
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby-lang
fujimura has quit [Remote host closed the connection]
skade has joined #ruby-lang
kerunaru has quit [Read error: Connection reset by peer]
fujimura has joined #ruby-lang
fujimura has quit [Remote host closed the connection]
fujimura has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
ArchRogem has joined #ruby-lang
TvL2386 has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #ruby-lang
workmad3 has joined #ruby-lang
fedexo has joined #ruby-lang
workmad3 has quit [Ping timeout: 240 seconds]
<TvL2386>
hi guys, I'm trying to get the hang of TDD and I'm using Test::Unit. I'm searching for documention on how to do stubs and mocks with test::unit. Do you guys have any pointers for me? I can only find other things like mocha. Is this the way to go?
hahuang61 has joined #ruby-lang
<jhass>
you're sure it's test-unit and not minitest pretending to be test-unit ?
<pipework>
Or mini-unit pretending to be test-test? The horror.
<TvL2386>
jhass, minitest is not a dependency, so it must be the stdlib test-unit
<TvL2386>
I don't want to pull in a dependency like mocha unless it's necessary
<jhass>
depending on your ruby version minitest is in stdlib
<ljarvis>
any respectable ruby version
<pipework>
TvL2386: What version of ruby are you using?
<TvL2386>
I'm using ruby-2.1
<pipework>
Then it's mini-test, iirc.
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<TvL2386>
should be part of minitest if you ask me
<oddmunds>
TvL2386: i guess not having stuff like that is what makes minitest mini.
<TvL2386>
oddmunds, maybe, but these extra 25 lines add a very nice feature if you ask me
<oddmunds>
yeah
<oddmunds>
i would like to run the tests that failed the last run first
ldnunes has joined #ruby-lang
<womble>
TvL2386: The problem is that when you ask everyone which extra 25 lines add a very nice feature, you end up with RSpec.
<tbuehlmann>
yorickpeterse, you could visit the manufactoring hall and check the employee's motivation
benlovell has quit [Ping timeout: 272 seconds]
pyo_ has quit [Read error: Connection reset by peer]
pyo_ has joined #ruby-lang
dorei has joined #ruby-lang
hahuang61 has joined #ruby-lang
<TvL2386>
womble, lol!
hahuang61 has quit [Ping timeout: 255 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
banister has joined #ruby-lang
banister has quit [Client Quit]
<TvL2386>
please forgive me for being such a newb on TDD and I hope I'm being clear, but I have an object that uses another object to query an external resource (proprietary protocol). I want to simulate the methods of this 'other object'. I think I'll have to create a new object to react exactly like the original and replace it in the instance variable of the original object?
<TvL2386>
*ducks quickly behind a bench to avoid eggs and rotten tomatoes*
<womble>
TvL2386: There's a few ways around that. I don't know if minitest's mocks do this, but rspec-mocks has an "any instance of" mock specifier, so you can say, "expect any instance of SomeClass to receive foo and return value"
<womble>
You can also stub the Class.new method, and have it return a mock object
<TvL2386>
womble, oh nice :-)
<womble>
Finally, if you've designed your class in a certain way, called "Dependency Injection", you should be creating your class by passing in all of what it needs, so you'd create an instance of your interface class and pass that in. For testing, you'd pass in a mock instead of the real interface object.
<womble>
(That made more sense in my head... let me know if you'd like an example of that last bit)
<TvL2386>
womble, luckily you make that second remark on your own! It's not entirely my limitation for not understanding then :-)
<womble>
OK, I'll whip up a quick example of dependency injection.
<TvL2386>
womble, I really appreciate your help womble!! Thanks!
ArchRogem has joined #ruby-lang
fujimura has quit [Ping timeout: 240 seconds]
chinmay_dd is now known as randomDude
randomDude is now known as chinmay_dd
banister has joined #ruby-lang
Voker57 has quit [Read error: Connection reset by peer]
<TvL2386>
That class Foo's initialize method looks indeed a lot like mine :-)
<womble>
What can I say, I have the powers of mind-reading.
GBrawl has quit [Quit: (null)]
<TvL2386>
womble, I love it!
<womble>
TvL2386: Sweet. Glad it makes sense.
<TvL2386>
I'm not exactly keen on having to specify which interface to use, I'd like it to be "under the hood", but it makes testing much better
joaomdmoura has joined #ruby-lang
<womble>
TvL2386: You mean you would expect your Foo class to be able to connect to a number of different backends depending on what the Foo is doing?
<TvL2386>
womble, oh no... there's only one
<TvL2386>
womble, as an alternative:
<TvL2386>
womble, would it be an idea to create an :interface= method on Foo to override it when you want (during testing)
bougyman has joined #ruby-lang
<womble>
You *could*, but I'm not a fan of creating methods that are *only* useful for testing.
<womble>
It tends to result in all sorts of ugly side-effects, because if you provide a method for it, *someone* (even if it's just future you) will decide that's the answer to their problem, and all kinds of hell can break loose.
<TvL2386>
hmmmmzzzzzz.... I wanted to say the same about the :initialize argument you created, but it's not true
<TvL2386>
womble, ha lol :-)
joaomdmoura has quit [Ping timeout: 244 seconds]
<TvL2386>
ok ok...
<TvL2386>
womble, thanks for taking the time to show me this!
benlovell has joined #ruby-lang
tomaz_b has quit [Ping timeout: 264 seconds]
<TvL2386>
womble, another question, when you do it like you say, I'm thinking of defining a StubInterface class in my test file that has all the methods and internals required to test what's being passed. Does that sound like the right thing to do?
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iamninja has joined #ruby-lang
benlovell has quit [Ping timeout: 250 seconds]
benlovell has joined #ruby-lang
Iskarlar has joined #ruby-lang
malconis has joined #ruby-lang
chinmay_dd has quit [Remote host closed the connection]
<womble>
TvL2386: I'd just use regular mock/stub/spy objects, but perhaps minitest's mocks aren't as powerful and you need extra support.
Forgetful_Lion has quit [Remote host closed the connection]
k3asd` has quit [Ping timeout: 265 seconds]
chouhoulis has quit [Remote host closed the connection]
sankaber has joined #ruby-lang
b_hoffman has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sankaber has quit [Read error: Connection reset by peer]
sankaber has joined #ruby-lang
hahuang61 has joined #ruby-lang
yalue has joined #ruby-lang
chinmay_dd has joined #ruby-lang
chinmay_dd has quit [Remote host closed the connection]
hahuang61 has quit [Ping timeout: 252 seconds]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Iskarlar has joined #ruby-lang
alestuber has quit [Ping timeout: 272 seconds]
imperator has joined #ruby-lang
[k- has joined #ruby-lang
symm- has joined #ruby-lang
alestuber has joined #ruby-lang
k3asd` has joined #ruby-lang
hahuang61 has joined #ruby-lang
myork80 has joined #ruby-lang
sandelius has joined #ruby-lang
TvL2386 has quit [Quit: Ex-Chat]
hahuang61 has quit [Ping timeout: 244 seconds]
fu2ristiq has joined #ruby-lang
gambl0re has quit [Ping timeout: 255 seconds]
<fu2ristiq>
hi everyone
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fu2ristiq has quit [Client Quit]
workmad3 has joined #ruby-lang
myork80 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
whippythellama has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
<imperator>
good morning
Ilyes512 has joined #ruby-lang
<apeiros>
moin imperator
Ilyes512 has quit [Read error: Connection reset by peer]
Ilyes512_ has joined #ruby-lang
JEG2 has joined #ruby-lang
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davispuh has joined #ruby-lang
Iskarlar has joined #ruby-lang
jas02 has quit [Quit: jas02]
ascarter has joined #ruby-lang
mcclurmc has joined #ruby-lang
vondruch has quit [Quit: Ex-Chat]
jas02 has joined #ruby-lang
Petruchio has joined #ruby-lang
chadwtaylor has joined #ruby-lang
joaomdmoura has joined #ruby-lang
<Petruchio>
Hi. Can I combine named keyword arguments, using the nice 2.1 syntax, with ad-hoc keyword arguments? I.e, something like: def initialize(x: 2, y: 3, *other_named_arguments) # which doesn't work
<jhass>
Petruchio: yes, use a second star, **kwargs
<Petruchio>
Ah, great. Thanks.
joaomdmoura has quit [Remote host closed the connection]
atomical has quit [Read error: Connection reset by peer]
<Petruchio>
Cool! This makes me very happy. :-)
nedp has quit [Remote host closed the connection]
atomical has joined #ruby-lang
<Petruchio>
My code just got simpler. Ciao.
Petruchio has left #ruby-lang [#ruby-lang]
j4cknewt has joined #ruby-lang
joaomdmoura has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
riotjones has quit [Remote host closed the connection]
bantic has joined #ruby-lang
postmodern has joined #ruby-lang
drew1 has joined #ruby-lang
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gamename has quit [Remote host closed the connection]
bougyman has quit [Quit: leaving]
StevenNunez has joined #ruby-lang
jas02 has quit [Quit: jas02]
jas02 has joined #ruby-lang
skade has joined #ruby-lang
bougyman_ has joined #ruby-lang
gambl0re has joined #ruby-lang
revath has quit [Ping timeout: 276 seconds]
bougyman_ has quit [Changing host]
bougyman_ has joined #ruby-lang
bougyman_ is now known as bougyman
ta has joined #ruby-lang
j4cknewt_ has joined #ruby-lang
hahuang61 has joined #ruby-lang
j4cknewt_ has quit [Client Quit]
drewo has joined #ruby-lang
drewo has quit [Client Quit]
j4cknewt has quit [Ping timeout: 265 seconds]
alestuber has quit [Remote host closed the connection]
davispuh has quit [Read error: Connection reset by peer]
davispuhh has joined #ruby-lang
drewo has joined #ruby-lang
Ilyes512_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shinnya has joined #ruby-lang
hahuang61 has quit [Ping timeout: 258 seconds]
drewo has quit [Client Quit]
rindolf has joined #ruby-lang
drewo has joined #ruby-lang
drewo has quit [Client Quit]
acqant has quit [Ping timeout: 246 seconds]
drewo has joined #ruby-lang
pyo_ has quit []
acqant has joined #ruby-lang
alestuber has joined #ruby-lang
konsolebox has joined #ruby-lang
lapide_viridi has joined #ruby-lang
ArchRogem has quit [Ping timeout: 252 seconds]
micmus has joined #ruby-lang
joaomdmoura has quit [Remote host closed the connection]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gamename has joined #ruby-lang
yfeldblum has joined #ruby-lang
gamename has quit [Remote host closed the connection]
palacz has joined #ruby-lang
gamename has joined #ruby-lang
<palacz>
can anyone point me in the right direction? jruby-1.7.20; jre 1.7 u80, I'm getting error when making https request using net/http
<palacz>
OpenSSL::SSL::SSLError: handshake alert: unrecognized_name from org/jruby/ext/openssl/SSLSocket.java:190:in `connect'
<palacz>
same code works fine using regular ruby
ItSANgo_ has joined #ruby-lang
ItSANgo__ has quit [Ping timeout: 245 seconds]
davispuhh has quit [Read error: Connection reset by peer]
davispuh has joined #ruby-lang
jas02 has quit [Quit: jas02]
rcvalle has joined #ruby-lang
<headius>
palacz: stop into #jruby with that question
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
revath has joined #ruby-lang
<palacz>
thanks headius
dhjondoh has quit [Remote host closed the connection]
gamename has quit [Remote host closed the connection]
riotjones has joined #ruby-lang
gamename has joined #ruby-lang
alestuber has quit [Ping timeout: 246 seconds]
allomov has quit [Remote host closed the connection]
ascarter has joined #ruby-lang
ascarter has quit [Read error: Connection reset by peer]
bruno- has quit [Ping timeout: 264 seconds]
riotjones has quit [Ping timeout: 246 seconds]
banister has joined #ruby-lang
symm- has quit [Ping timeout: 246 seconds]
yfeldblum has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
hahuang61 has joined #ruby-lang
solars has quit [Ping timeout: 246 seconds]
arooni-mobile has joined #ruby-lang
stef204 has joined #ruby-lang
hahuang61 has quit [Ping timeout: 264 seconds]
caseypatrickdris has joined #ruby-lang
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
palacz has quit [Quit: Page closed]
VinnyBoy has joined #ruby-lang
Ilyes512 has joined #ruby-lang
Ilyes512 has quit [Client Quit]
sandelius has joined #ruby-lang
stan has quit [Ping timeout: 265 seconds]
baweaver has joined #ruby-lang
fusillicode has quit [Ping timeout: 258 seconds]
chouhoulis has joined #ruby-lang
zendrix has joined #ruby-lang
BanzaiJoe has joined #ruby-lang
lnr has quit [Max SendQ exceeded]
skade has quit [Quit: Computer has gone to sleep.]
allomov has joined #ruby-lang
bb010g has quit [Quit: Connection closed for inactivity]
revath has quit [Ping timeout: 252 seconds]
StevenNunez has quit [Remote host closed the connection]
rindolf has quit [Quit: Leaving]
rindolf has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
zendrix has quit [Remote host closed the connection]
zendrix has joined #ruby-lang
mikecmpbll has quit [Ping timeout: 265 seconds]
b_hoffman has quit [Quit: b_hoffman]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
b_hoffman has joined #ruby-lang
callumacrae is now known as nub
arooni-mobile has quit [Ping timeout: 256 seconds]
baweaver has quit [Remote host closed the connection]
revath has joined #ruby-lang
[k- has quit [Remote host closed the connection]
Pathfinder has joined #ruby-lang
<imperator>
anyone else here using rbenv? i'm not seeing jruby 9k pre2 available for some reason
hahuang61 has joined #ruby-lang
<imperator>
did a git pull in .rbenv, seems up to date
rikkipitt has joined #ruby-lang
benlovell has quit [Ping timeout: 258 seconds]
djbkd has joined #ruby-lang
<imperator>
nm, found it, had to update the ruby-build plugin
hahuang61 has quit [Ping timeout: 258 seconds]
Voker57 has joined #ruby-lang
arooni-mobile has joined #ruby-lang
fusillicode has joined #ruby-lang
alestuber has joined #ruby-lang
revath has quit [Ping timeout: 258 seconds]
k3asd` has quit [Remote host closed the connection]
solars has joined #ruby-lang
allomov has quit [Ping timeout: 240 seconds]
jgpawletko has joined #ruby-lang
k3asd` has joined #ruby-lang
zendrix has quit [Remote host closed the connection]
allomov has joined #ruby-lang
stamina has quit [Quit: WeeChat 1.2]
rikkipitt has quit [Ping timeout: 265 seconds]
wallerdev has joined #ruby-lang
zendrix has joined #ruby-lang
k3asd` has quit [Ping timeout: 276 seconds]
k3asd` has joined #ruby-lang
tibig has joined #ruby-lang
cornerma1 has joined #ruby-lang
cornerman has quit [Ping timeout: 272 seconds]
cornerma1 is now known as cornerman
tenderlove has joined #ruby-lang
sandelius has joined #ruby-lang
revath has joined #ruby-lang
Pathfinder has quit [Ping timeout: 250 seconds]
b_hoffman has quit [Quit: b_hoffman]
joaomdmoura has joined #ruby-lang
benlovell has joined #ruby-lang
Pathfinder has joined #ruby-lang
sarkyniin has joined #ruby-lang
danguita has left #ruby-lang ["Ciao! (WeeChat 0.4.2)"]
thebastl has joined #ruby-lang
bertocode has joined #ruby-lang
lele_ is now known as Guest24
drbrain changed the topic of #ruby-lang to: will redirect to #ruby the morning of June 1, Pacific Time
<darix>
ohnoes
drbrain changed the topic of #ruby-lang to: this channel will redirect to #ruby the morning of June 1, Pacific Time
<darix>
drbrain: some time would be nice
<darix>
otherwise pacific time is an useless qualifier :)
<drbrain>
well, it depends on when I get up and what I'm doing on June 1
<drbrain>
"morning of" is as specific as I can get since people might surprise me with a meeting
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
revath has quit [Quit: Leaving.]
revath has joined #ruby-lang
|jemc| has left #ruby-lang ["WeeChat 1.1.1"]
mikecmpbll has joined #ruby-lang
solars has quit [Ping timeout: 250 seconds]
<rindolf>
drbrain: so I should just /join #ruby from now?
<drbrain>
rindolf: yes
<rindolf>
drbrain: OK, thanks.
hahuang61 has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 246 seconds]
alestube_ has joined #ruby-lang
alestuber has quit [Ping timeout: 250 seconds]
hahuang61 has quit [Ping timeout: 244 seconds]
intinig has quit [Remote host closed the connection]
redbullion has joined #ruby-lang
<redbullion>
has anyone seen a good CONCISE guide which covers the differences between methods and procs?
<redbullion>
procs and lambdas are objects I gather;
djbkd has joined #ruby-lang
djbkd has quit [Read error: Connection reset by peer]
alestube_ has quit [Ping timeout: 245 seconds]
djbkd has joined #ruby-lang
<drbrain>
methods are objects too
<drbrain>
they're just harder to get to
<drbrain>
method & lambda check arguments, procs do not
<redbullion>
tks @drbrain ; is there a guide beyond the ruby org website that you've found useful?
<drbrain>
lambda and procs can be anonymous, methods have name
<drbrain>
s
<drbrain>
redbullion: ↑ is about as concise as it gets
<redbullion>
tks
<drbrain>
someone else might have a website handy
duderonomy has quit [Ping timeout: 276 seconds]
sandelius has joined #ruby-lang
baweaver has joined #ruby-lang
riotjones has joined #ruby-lang
djellemah has quit [Ping timeout: 265 seconds]
workmad3 has quit [Ping timeout: 265 seconds]
arBmind has joined #ruby-lang
arooni-mobile has quit [Quit: Leaving]
riotjones has quit [Ping timeout: 246 seconds]
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby-lang
k3asd` has quit [Ping timeout: 246 seconds]
baweaver has quit [Remote host closed the connection]
zendrix has quit [Remote host closed the connection]
rikkipitt has joined #ruby-lang
baweaver has joined #ruby-lang
fusillicode has quit [Ping timeout: 246 seconds]
alestuber has joined #ruby-lang
b_hoffman has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
alestuber has quit [Ping timeout: 244 seconds]
djbkd has joined #ruby-lang
Pathfinder has quit [Ping timeout: 272 seconds]
rikkipitt has quit [Quit: Leaving...]
leandrosnunes has joined #ruby-lang
leandrosnunes has quit [Client Quit]
alestuber has joined #ruby-lang
duderonomy has joined #ruby-lang
zendrix has joined #ruby-lang
zendrix has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
hahuang61 has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
chinmay_dd has joined #ruby-lang
jo__ has quit [Quit: Connection closed for inactivity]
hahuang61 has quit [Ping timeout: 256 seconds]
symm- has joined #ruby-lang
skade has joined #ruby-lang
Voker57 has quit [Read error: Connection reset by peer]
bb010g has joined #ruby-lang
Iskarlar has joined #ruby-lang
shazaum has quit [Quit: This computer has gone to sleep]
egypt has joined #ruby-lang
benlovell has joined #ruby-lang
b_hoffman has quit [Quit: b_hoffman]
davispuh has quit [Remote host closed the connection]
workmad3 has joined #ruby-lang
elia has joined #ruby-lang
banister has quit [Ping timeout: 256 seconds]
jo__ has joined #ruby-lang
zendrix has joined #ruby-lang
GBrawl has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
elia has quit [Quit: Computer has gone to sleep.]
konsolebox has quit [Quit: Leaving]
LBo has joined #ruby-lang
thebastl has quit [Read error: Connection reset by peer]
thebastl has joined #ruby-lang
chadwtaylor has quit [Quit: Leaving...]
SpeakerToMeat is now known as teck932
arooni-mobile has joined #ruby-lang
teck932 is now known as SpeakerToMeat
elia has joined #ruby-lang
banister has joined #ruby-lang
shazaum has joined #ruby-lang
thebastl has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lapide_viridi has quit [Quit: Leaving]
zendrix has quit [Remote host closed the connection]
<BanzaiJoe>
given a container, the player can either convert resources to storage or store the resources, there's more flair and names and idea but that's fundamental start
<irb1>
actually this is better: require "time"; DateTime.strptime("2015-05-19T02:27:48:526-0400", "%Y-%m-%dT%T:%N%z").to_time.utc
<BanzaiJoe>
for now, objective is to end up with most resources
<apeiros>
interesting. DateTime has no #utc
<apeiros>
only Time
<jhass>
apeiros: rails
<apeiros>
oh ruby and your inconsistencies :-(
<jhass>
irb1: did you try assigning the DateTime unchanged? %z parses the zone and AR should convert to utc
<irb1>
jhass: i did not
<irb1>
can you provide a quick code sample
<jhass>
you did foo.something_at = some_string, now do foo.something_at = DateTime.parse(...)#nothing more here
djbkd has joined #ruby-lang
joaomdmoura has joined #ruby-lang
gianlucadv has quit [Ping timeout: 264 seconds]
<irb1>
thank you all for your help!
jgpawletko has quit [Quit: jgpawletko]
baweaver has joined #ruby-lang
hahuang65 has quit [Ping timeout: 245 seconds]
irb1 has quit [Quit: irb1]
Petruchio has joined #ruby-lang
workmad3 has joined #ruby-lang
<Petruchio>
Is there a standard way to get the key names from a format string? If, for instance, I have "The %{animal} says %{sound}", I would want animal and sound.
<Petruchio>
:animal, :sound or 'animal', 'sound'... whatever.
<Petruchio>
Short, of course, of parsing the string myself.
<jhass>
would surprise me
<jhass>
especially since it's a simple .scan away
caseypatrickdris has quit [Remote host closed the connection]
<apeiros>
Petruchio: scan(/%\{\w+\}/) should do the job
hinbody has quit [Quit: leaving]
<jhass>
[^}]+
<jhass>
actually I have no idea about the rules for %{..} :P
<ljarvis>
good old fasioned pedantry
<apeiros>
jhass: valid identifier I'd guess
<apeiros>
given that it needs to be a valid symbol without quotes
<Petruchio>
Thanks. Yeah, that wil certainly do it. I was wondering whether there was an "official" way.