thatdutchguy has quit [Remote host closed the connection]
macmartine has quit [Read error: Connection reset by peer]
<zenspider>
damnit... I hate apache
<zenspider>
rking: fixed. thanks for the heads up. all my domains were borked. yay for revision control
<rking>
zenspider: No links to github repo anywhere. ☹
<zenspider>
*shrug* everything is under github.com/seattlerb
<zenspider>
and last time it was released... was pre-github
<zenspider>
(and it isn't my primary dev env)
<zenspider>
ok. gotta run.
burgestrand has quit [Ping timeout: 246 seconds]
<rking>
zenspider: Cool. I'll try heckle out. I've never actually used a tool like it.
nariyal has joined #ruby-lang
piyush has quit [Read error: Operation timed out]
macmartine has joined #ruby-lang
nariyal has quit [Client Quit]
rfay has quit [Quit: This computer has gone to sleep]
nariyal has joined #ruby-lang
nariyal has quit [Client Quit]
justinmcp has quit [Remote host closed the connection]
justinmcp has joined #ruby-lang
eydaimon has joined #ruby-lang
eydaimon has quit [Changing host]
eydaimon has joined #ruby-lang
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
<eydaimon>
is there a way to reliably get the name of the current method? __method__ doesn't work with alias, and caller doesn't work same with tools like pry.
datanoise has joined #ruby-lang
macmartine has quit [Quit: Computer has gone to sleep.]
tenderlove has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
<dkannan>
eydaimon: was wondering what if i can match a sequence of regex. am not sure if i am making sense
jarib has quit [Excess Flood]
nazty has quit [Read error: Connection reset by peer]
nazty has joined #ruby-lang
<dkannan>
question is named matches capture any regex inside round braces ie. ( some regexes )
GarethAdams has joined #ruby-lang
jarib has joined #ruby-lang
naz has joined #ruby-lang
Madis_ has quit [Remote host closed the connection]
nazty has quit [Ping timeout: 246 seconds]
<dkannan>
eydaimon: but thanks :-)
faces has joined #ruby-lang
facest has quit [Ping timeout: 255 seconds]
wallerdev has quit [Quit: wallerdev]
chendo_ has quit [Ping timeout: 240 seconds]
chendo_ has joined #ruby-lang
Hakon has quit [Quit: Leaving...]
solars has quit [Read error: Operation timed out]
piyush has joined #ruby-lang
justinmcp has joined #ruby-lang
mars777 has quit [Quit: mars777]
jimq has joined #ruby-lang
solars has joined #ruby-lang
lzhz_ has quit [Quit: leaving]
lzhz has joined #ruby-lang
Hakon has joined #ruby-lang
Hakon has quit [Quit: Leaving...]
Carnage\ has quit []
kain has joined #ruby-lang
jimq has left #ruby-lang [#ruby-lang]
<masterkorp>
RUBIIESSS
<masterkorp>
sorry forgot to take my meds
krisjk has joined #ruby-lang
Hakon has joined #ruby-lang
<krisjk>
Im using gem mysql2 to connect to a MySQL database in my ruby code, but the reconnect method does not work. It says 'undefined method `reconnect' for #<Mysql2::Client:0x8e8da0c> (NoMethodError)'
<krisjk>
so when the mysql server goes down, inspite of me having a loop which waits for some time and then tries to reconnect, the application crashes with the above error
<krisjk>
Im using bundler and my machine is running ubuntu 12.04 any way to fix the reconnect issue with the mysql2 gem ?
postmodern has quit [Quit: Leaving]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
Hakon has quit [Quit: Leaving...]
Hakon has joined #ruby-lang
Hakon has quit [Read error: Connection reset by peer]
NOKAH has joined #ruby-lang
sush24 has joined #ruby-lang
<darix>
krisjk: check the api docs of mysql2?
<krisjk>
darix: ur right, the reconnect method is not there
<krisjk>
so is there any way to try a reconnect if the connection is not available ?
Wazm has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Ping timeout: 244 seconds]
xyzodiac has joined #ruby-lang
probst has joined #ruby-lang
mwjcomputing has joined #ruby-lang
justinmcp has quit [Remote host closed the connection]
d3vic3 has joined #ruby-lang
probst has quit [Quit: probst]
probst has joined #ruby-lang
conorreedy has quit [Remote host closed the connection]
conorreedy has joined #ruby-lang
JustinCampbell has joined #ruby-lang
jbwiv has quit [Remote host closed the connection]
guns has joined #ruby-lang
CoverSlide has quit [Ping timeout: 245 seconds]
lonelydimple has quit [Ping timeout: 256 seconds]
guns has quit [Quit: guns]
probst has quit [Quit: probst]
<kith>
hmm no "Dir.rm -rf" :S
sduckett has joined #ruby-lang
<kith>
how do i remove a directory when its not empty?
CoverSlide has joined #ruby-lang
<andrewvos>
FileUtils.rm_rf
<andrewvos>
kith: ^
A124 has quit [Quit: Leaving.]
<andrewvos>
(require "fileutils")
A124 has joined #ruby-lang
xyzodiac has quit [Quit: Computer has gone to sleep.]
piyush has quit [Ping timeout: 255 seconds]
probst has joined #ruby-lang
justinmcp has joined #ruby-lang
kain has quit [Remote host closed the connection]
kain has joined #ruby-lang
Criztian_ has joined #ruby-lang
Criztian has quit [Read error: Connection reset by peer]
probst has quit [Quit: probst]
chendo__ has joined #ruby-lang
Jake232 has joined #ruby-lang
<andrewvos>
OMG I started syncing gmail with offlineimap, saw the amount that offlineimap said, went to gmail/all mail and saw it was a quarter. Thought offlineimap was deleting all my emails :(
sailias has joined #ruby-lang
Hakon has quit [Quit: Leaving...]
stiang has joined #ruby-lang
sailias has quit [Ping timeout: 256 seconds]
carloslopes has joined #ruby-lang
<andrewvos>
Wow it's really weird looking at old emails. Especially when they're from dead people!
xyzodiac has joined #ruby-lang
<ddfreyne>
why ar eyou using offlineimap? how are you using it?
<andrewvos>
ddfreyne: Cause I've always wanted all my gmail messages in my dropbox folder
rfay has quit [Quit: This computer has gone to sleep]
Hakon has quit [Quit: Leaving...]
hakunin has joined #ruby-lang
replore has quit [Remote host closed the connection]
rippa has joined #ruby-lang
rfay has joined #ruby-lang
dreamhawk has quit [Ping timeout: 268 seconds]
runeb has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
dreamhawk has joined #ruby-lang
JustinCa_ has joined #ruby-lang
anannie has joined #ruby-lang
JustinCampbell has quit [Ping timeout: 260 seconds]
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
runeb has quit [Ping timeout: 248 seconds]
urbanmonk has quit [Ping timeout: 246 seconds]
gnufied has joined #ruby-lang
d3vic3 has quit [Quit: leaving]
JustinCampbell has joined #ruby-lang
JustinCa_ has quit [Ping timeout: 245 seconds]
tjadc has quit [Read error: Connection reset by peer]
vesan has quit [Ping timeout: 260 seconds]
vesan has joined #ruby-lang
kjr has left #ruby-lang [#ruby-lang]
kjr has joined #ruby-lang
carloslopes has quit [Quit: Leaving.]
nXqd has quit [Ping timeout: 260 seconds]
<zzak>
wish there was a way to hide files from a diff in github
gsav_ has joined #ruby-lang
gsav has quit [Ping timeout: 255 seconds]
tRAS has quit [Quit: Mother, did it need to be so high?]
enebo has joined #ruby-lang
KA_ has joined #ruby-lang
alexkira has joined #ruby-lang
KA_ has quit [Client Quit]
KA_ has joined #ruby-lang
KA_ has quit [Client Quit]
<Spaceghostc2c>
steveklabnik: Now I'm all sad. :(
nariyal has joined #ruby-lang
runeb has joined #ruby-lang
<crankharder>
is there any tool that's basically mechanize/selenium w/o the browser? I'm trying to scrape a service behind a post request, and for whatever reason can't get the params/cookies/headers right in a command line tool. I'd really like to be able to do this from the command line w/o a browser. Thoughts?
macmartine has joined #ruby-lang
imajes has quit [Excess Flood]
jarib has quit [Excess Flood]
<zzak>
crankharder: you mean a headless browser? whats wrong with mechanize?
imajes has joined #ruby-lang
jarib has joined #ruby-lang
<crankharder>
i can't get the headers/cookies right
<crankharder>
the request comes back w/ an error
<crankharder>
in chrome/inspector i dont see anything changing, although there are some wack/really-long/hashy-looking params.
<crankharder>
*changing from request to request, like a auth token or some such
<steveklabnik>
Spaceghostc2c: what?
xyzodiac has joined #ruby-lang
rmcauley has joined #ruby-lang
krohrbaugh has joined #ruby-lang
gsav has joined #ruby-lang
<zzak>
can you be more specific? someone in here should be able to help
rmcauley has quit [Quit: Leaving.]
Liquidrain has joined #ruby-lang
<Liquidrain>
blah = "hello"; (40 - blah.length) * " "; results in "string cannot be coerced into Fixnum" when what I really want is 35 spaces. how do I get around this?
gaveen has quit [Ping timeout: 245 seconds]
<Liquidrain>
(this is a problem that is *impossible* to google)
<crankharder>
" " * (40 - blah.length)
<lianj>
" " * 40
urbanmonk has joined #ruby-lang
<lianj>
Liquidrain: "hello".rjust(40, " ")
sush24 has quit [Ping timeout: 256 seconds]
<Liquidrain>
lianj: that's a much better solution. crankharder: that works too.
<Liquidrain>
I find it unintuitive that order would make a difference in this case.
<Spaceghostc2c>
I wanted to talk about the merits and uses of factory patterns and just plain objects.
<Spaceghostc2c>
steveklabnik: ^
enebo has quit [Quit: enebo]
Liquidrain has left #ruby-lang ["Leaving."]
<zzak>
crankharder: yessir
<crankharder>
go here https://www.bikereg.com/Net/12000, click the big "Continue" button in the middle of the page. see more data come back (also see network tab in chrome inspector) -- for all my trying i cannot mimick that post request using mechanize
rfay has quit [Quit: This computer has gone to sleep]
solars has joined #ruby-lang
kuja has quit [Ping timeout: 245 seconds]
gaveen has joined #ruby-lang
gaveen has quit [Changing host]
gaveen has joined #ruby-lang
kuja has joined #ruby-lang
imajes has quit [Excess Flood]
aharris_ has joined #ruby-lang
imajes has joined #ruby-lang
ryanlecompte has joined #ruby-lang
<zzak>
crankharder: you might be able to click the button with mechanize and simulate the JS, otherwise maybe capybara-webkit would do the trick
<steveklabnik>
Spaceghostc2c: so talk abou tthem.
<Spaceghostc2c>
steveklabnik: Well jeeze, boss. I prefer using the objects directly in my unit tests.
<Spaceghostc2c>
It seems to help me 'hear' the pains in my code more when I'm actually using them as opposed to factories or fixtures.
<Spaceghostc2c>
Something that bothers me right now is having to update all my specs because I add a new attr_accessor that has a presence validation or something like that.
<Spaceghostc2c>
Stubbing would still require maintenance across my test suite.
GarethAdams has quit [Quit: Leaving...]
CarlB_the_great has quit [Remote host closed the connection]
alvaro_o has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
<zzak>
wouldn't that be the point of using a factory?
nyuszika7h has quit [Read error: Connection reset by peer]
CarlB_the_great has joined #ruby-lang
<zzak>
you don't have to maintain valid_attributes{}
<Spaceghostc2c>
Yeah, but then you have to build out this mountain of factories and variations.
nyuszika7h has joined #ruby-lang
sent-hil has quit [Read error: Connection reset by peer]
nyuszika7h has quit [Client Quit]
sent-hil has joined #ruby-lang
xyzodiac has quit [Quit: Computer has gone to sleep.]
<zzak>
factory weighs about as much as valid_attributes
<zzak>
variations?
__butch__ has joined #ruby-lang
<zzak>
you mean like sequence?
javilm has joined #ruby-lang
sent-hil has quit [Remote host closed the connection]
nyuszika7h has joined #ruby-lang
sent-hil has joined #ruby-lang
runeb has joined #ruby-lang
<Spaceghostc2c>
zzak: No, like traits, other factories like :user_with_valid_inventory, etc.
sent-hil_ has joined #ruby-lang
<Spaceghostc2c>
It seems like a noisy abstraction except for the one pain I have in using the objects directly.
<Spaceghostc2c>
I'll use factories in functional tests, but not unit or integration.
sent-hil has quit [Read error: Connection reset by peer]
chimkan_ has quit [Quit: chimkan_]
cantonic_ has joined #ruby-lang
<zzak>
well i guess thats your preference and youre welcome to have your own opinions
enebo has joined #ruby-lang
coryf has joined #ruby-lang
<crankharder>
zzak: hmm, so w/ capybara, on the Capybara::Node::Element#click, I get "undefined|0|ReferenceError: Can't find variable: __doPostBack" -- where I know __doPostBack is a JS function loaded in a referenced file on the page (I know this cause i've been digging around a lot) -- so capybara isn't loading the referenced javascript?
cantonic has quit [Ping timeout: 255 seconds]
cantonic_ is now known as cantonic
<steveklabnik>
Spaceghostc2c: the point is that you're not doing unit tests
<steveklabnik>
if you're not doing factories
solars has quit [Ping timeout: 246 seconds]
<steveklabnik>
you add new behavior? you need to add a new test
<Spaceghostc2c>
steveklabnik: Well duh.
<steveklabnik>
the pain means you're doing it wrong
<Spaceghostc2c>
I just build objects in my unit tests, but as my objects become more complex, the previous tests start failing because they weren't aware of that complexity even though it isn't under test.
xyzodiac has joined #ruby-lang
<steveklabnik>
well i cant tell you without some code
<steveklabnik>
honestly
<steveklabnik>
this is like 'how do you fix the economy?' 'which one?' all of them
<Spaceghostc2c>
Nevermind then. :)
runeb has quit [Ping timeout: 246 seconds]
<steveklabnik>
i wrote about this a bunch on my blog with examples, check out the 'rstatus refactoring' series
rfay has quit [Client Quit]
<steveklabnik>
which uses Real Code (tm)
* Spaceghostc2c
hands steveklabnik a ™
BryanWB has joined #ruby-lang
coryf has quit [Read error: Connection reset by peer]
coryf has joined #ruby-lang
enebo has quit [Quit: enebo]
CarlB_the_great has quit [Remote host closed the connection]
<Spaceghostc2c>
steveklabnik: I'm a bit dismayed. I can't see how protected/private s a smell.
<Spaceghostc2c>
is*
CarlB_the_great has joined #ruby-lang
<Spaceghostc2c>
It might just be something I'll be okay with disagreeing on though.
CarlB_the_great has quit [Remote host closed the connection]
_Amen_Makveli_ has joined #ruby-lang
probst has quit [Quit: probst]
_Amen_Makveli_ has quit [Client Quit]
_Amen_Makveli_ has joined #ruby-lang
_Amen_Makveli_ has quit [Remote host closed the connection]
tenderlove has quit [Read error: Connection reset by peer]
<erikh>
woohoo, ri to the rescue
<erikh>
zzak: <3
tenderlove has joined #ruby-lang
tenderlove has quit [Read error: Connection reset by peer]
tenderlove has joined #ruby-lang
chimkan_ has quit [Quit: chimkan_]
RomyRomy has quit [Quit: RomyRomy]
_nitti has quit [Ping timeout: 256 seconds]
RomyRomy has joined #ruby-lang
tenderlove has quit [Read error: Connection reset by peer]
tenderlo_ has joined #ruby-lang
RomyRomy has quit [Client Quit]
RomyRomy has joined #ruby-lang
enebo has joined #ruby-lang
tenderlo_ has quit [Read error: Connection reset by peer]
tenderlove has joined #ruby-lang
gsav has joined #ruby-lang
jtoy has quit [Quit: jtoy]
RomyRomy has quit [Client Quit]
rwilcox has joined #ruby-lang
tenderlove has quit [Read error: Connection reset by peer]
tenderlove has joined #ruby-lang
thatdutchguy has quit [Ping timeout: 260 seconds]
nofxx has joined #ruby-lang
nofxx has joined #ruby-lang
nofxx has quit [Changing host]
tenderlove has quit [Read error: Connection reset by peer]
tenderlove has joined #ruby-lang
runeb has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
Tearan has joined #ruby-lang
<zzak>
?
tenderlove has quit [Read error: Connection reset by peer]
tenderlove has joined #ruby-lang
<zzak>
erikh: what happened?
<erikh>
just thanking you for awesome rdoc hotness
jbsan has quit [Quit: jbsan]
swarles has joined #ruby-lang
jbsan has joined #ruby-lang
<zzak>
I dont think I can take credit for String#encode :)
wyhaines_ has quit [Remote host closed the connection]
<erikh>
ah
<erikh>
well, I'm giving you a compliment anyway
<erikh>
shut up and take it
runeb has quit [Ping timeout: 244 seconds]
<zzak>
haha
<Harzilein>
what's the ... uhm ... canonical way to get localized strftime in 1.9?
<Harzilein>
#ruby-de was already suggesting FFI + libc ;)
<erikh>
well I think ruby can leverage your LC_* stuff
<erikh>
unless you're talking about feeding it locale data dynamically.
<erikh>
(then I don't know)
robgleeson has quit [Ping timeout: 240 seconds]
<Harzilein>
erikh: no, i don't want to provide own localization, just the one from the system. the thing is the docs for Time#strftime say 1.9 stopped localizing strftime but there is no hint at what to use instead
JustinCampbell has quit [Remote host closed the connection]