twoism has quit [Remote host closed the connection]
zarubin has quit [Ping timeout: 264 seconds]
c0rn has quit [Quit: Computer has gone to sleep.]
mansi has joined #ruby
viszu has quit [Quit: Leaving.]
mikepack has quit [Remote host closed the connection]
dEPy has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
rupee has quit [Quit: Leaving]
cjsarette has quit [Ping timeout: 276 seconds]
marr has quit [Ping timeout: 240 seconds]
tatsuya_o has joined #ruby
talntid2 is now known as talntid
rgreen_ has quit [Ping timeout: 250 seconds]
horofox_ has joined #ruby
mansi has quit [Ping timeout: 264 seconds]
kindjal has joined #ruby
vlad_starkov has joined #ruby
cj3kim has quit [Ping timeout: 252 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
bzitzow has quit [Read error: Operation timed out]
KTMBoID has joined #ruby
nettoweb has joined #ruby
tatsuya_o has quit [Ping timeout: 240 seconds]
atmosx has joined #ruby
atmosx_ has quit [Ping timeout: 240 seconds]
pitzips has quit [Ping timeout: 248 seconds]
mahmoudimus has joined #ruby
jjbohn has quit [Quit: Leaving...]
cjsarette has joined #ruby
robscomp_ has quit [Remote host closed the connection]
robscomputer_ has joined #ruby
jonkri has quit [Quit: jonkri]
brennanMKE has quit [Remote host closed the connection]
DanKnox is now known as DanKnox_away
vlad_starkov has quit [Ping timeout: 240 seconds]
Targen has quit [Ping timeout: 264 seconds]
_seanc_ has quit [Ping timeout: 264 seconds]
cortexman has quit [Quit: Leaving.]
sergicles has quit [Quit: sergicles]
pitzips has joined #ruby
robscomputer_ has quit [Ping timeout: 276 seconds]
<nettoweb>
guys, I'm creating a webapp to sell some videos, the visitor can choose the videos, and then buy (with paypal or another site). But I'm a bit confused with the logic, models… I never created this kind os webapp and in my caso I think it's simple, because I donk need to know the address of user neither quantity, because it dont make sense for videos… he pay for watch. so I'd like to know how to procced.
<nettoweb>
Actually I have two controllers: Items and Cart, but I donk have Orders neither checkout…
<nettoweb>
I'm thinking this is necessary
cjsarette has quit [Ping timeout: 245 seconds]
<MrZYX>
#rubyonrails
<pontiki>
also: spree
gnerol_ has quit [Read error: Operation timed out]
wmoxam has joined #ruby
jbueza has joined #ruby
<nettoweb>
pontiki: the problem with spree is that i cant use a payment method that we use in my country, a specific case
jlast has quit [Remote host closed the connection]
<pontiki>
i thought spree was payment gateway agnostic
<pontiki>
we certainly weren't bound to any particular payment gateway
nbouscal has joined #ruby
<pontiki>
but do pop over the #rubyonrails as one of the spree-ists is there
zastern has joined #ruby
blackmesa has quit [Quit: WeeChat 0.4.1]
zeade has quit [Quit: Leaving.]
nowthatsamatt has joined #ruby
ner0x has joined #ruby
cjsarette has joined #ruby
Xeago_ has joined #ruby
<blitz>
so if I wanted to iterate through a hash sorted by keys in reverse order how would I go about that
<blitz>
I assume h.sort.reverse sorts on keys
<blitz>
in my original I wanted to sort on values**
<pontiki>
so which do you actually want?
<blitz>
I want to iterate through a hash by reverse sorted order values
aedorn has quit [Remote host closed the connection]
<pontiki>
off the top of my head, i'd pass a block to sort to test the values, then chain it with reverse
<blitz>
since I have repeated values I can't do reverse lookups after sorting those so I'm stumped
sambao21 has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<blitz>
well I got it pontiki
lele has quit [Ping timeout: 268 seconds]
<blitz>
h.sort{ |l,r| r[1]<=>l[1] }
<pontiki>
^
<blitz>
ty google
S0da has joined #ruby
mahmoudimus has joined #ruby
kindjal has quit [Ping timeout: 276 seconds]
lele has joined #ruby
skasio_ has joined #ruby
skasio_ has quit [Client Quit]
skasio has quit [Quit: leaving]
skasio has joined #ruby
superscott[8] has joined #ruby
dillwithers has joined #ruby
airlok has joined #ruby
DonRichie has quit [Ping timeout: 256 seconds]
hogeo has joined #ruby
DonRichie has joined #ruby
zarubin has joined #ruby
jkline has quit [Quit: jkline]
jkline has joined #ruby
jarin has quit [Ping timeout: 246 seconds]
sambao21 has quit [Ping timeout: 240 seconds]
lele has quit [Ping timeout: 264 seconds]
jarin has joined #ruby
cpruitt has quit [Quit: cpruitt]
tommyvyo has joined #ruby
tkuchiki has joined #ruby
cburyta has quit [Remote host closed the connection]
fredjean has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
reset has quit [Quit: Leaving...]
cburyta has joined #ruby
atno has joined #ruby
S0da has quit [Remote host closed the connection]
ebobby has quit [Quit: Lost terminal]
tommyvyo has quit [Quit:]
Notte has quit [Remote host closed the connection]
inimit has joined #ruby
asgardBSD has joined #ruby
ssvo has quit [Ping timeout: 246 seconds]
fredjean has quit [Quit: Computer has gone to sleep.]
Vivekananda has quit [Quit: Ex-Chat]
lele has joined #ruby
Vivekananda has joined #ruby
dsog_ has joined #ruby
sepp2k has quit [Quit: Leaving.]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Spooner>
It is a-z and A-Z. The middle - isn't making sense.
blischalk has joined #ruby
<citizensinspace>
thanks Spooner!
takezawa has quit [Remote host closed the connection]
horofox_ has quit [Quit: horofox_]
takezawa has joined #ruby
zarubin has quit [Read error: Operation timed out]
danshultz has joined #ruby
ckrailo has joined #ruby
sergicles has joined #ruby
headius has joined #ruby
headius has left #ruby [#ruby]
bionoid has quit [Remote host closed the connection]
thepumpkin has quit [Remote host closed the connection]
brennanMKE has joined #ruby
v1n has joined #ruby
brennanMKE has quit [Read error: Connection reset by peer]
brennanMKE has joined #ruby
danshultz has quit [Remote host closed the connection]
sarkis has joined #ruby
bionoid has joined #ruby
Spooner has quit [Quit: Leaving]
nbouscal has quit [Ping timeout: 246 seconds]
Davey has joined #ruby
wargasm has joined #ruby
nari has joined #ruby
cburyta has joined #ruby
AndroUser has joined #ruby
blitz has quit [Quit: This computer has gone to sleep]
DanKnox_away is now known as DanKnox
blitz has joined #ruby
rhys has quit [Quit: Leaving]
ravster has left #ruby [#ruby]
AndroUser has quit [Client Quit]
Rubas has quit [Quit: Lost terminal]
wu_lmao has quit [Remote host closed the connection]
Rubas__ has quit [Quit: Lost terminal]
JZTech101 has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC]
marcdel has joined #ruby
jrhorn424 has joined #ruby
pskosinski has quit [Quit: Til rivido Idisti!]
daniel_hinojosa has joined #ruby
sambao21 has joined #ruby
jjbohn has joined #ruby
blischalk has quit [Quit: Leaving]
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<pontiki>
blitz: just fyi, based on spooner's comment, the speed different in sort vs sort_by is pretty real: https://gist.github.com/tamouse/5962804 but only if you're doing it a lot, i think
verto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
BSaboia has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
cj3kim has joined #ruby
agjacome has joined #ruby
asgardBSD has quit [Ping timeout: 256 seconds]
cantonic has quit [Ping timeout: 264 seconds]
blitz has quit [Quit: This computer has gone to sleep]
cantonic has joined #ruby
Domon has joined #ruby
cj3kim has quit [Ping timeout: 276 seconds]
milardovich has joined #ruby
nettoweb has quit [Quit: nettoweb]
Meatant has quit [Remote host closed the connection]
milardovich has quit [Max SendQ exceeded]
milardovich has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
citizensinspace has quit [Quit: citizensinspace]
reset has joined #ruby
milardovich has quit [Max SendQ exceeded]
airlok has quit [Remote host closed the connection]
milardovich has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
sergicles has quit [Read error: No route to host]
milardovich has quit [Max SendQ exceeded]
milardovich has joined #ruby
milardovich has quit [Max SendQ exceeded]
sergicles has joined #ruby
milardovich has joined #ruby
milardovich has quit [Max SendQ exceeded]
cburyta has quit [Remote host closed the connection]
milardovich has joined #ruby
superscott[8] has quit [Quit: superscott[8]]
bionoid has quit [Read error: Connection reset by peer]
zets has quit [Ping timeout: 240 seconds]
milardovich has quit [Max SendQ exceeded]
milardovich has joined #ruby
bionoid has joined #ruby
milardovich has quit [Max SendQ exceeded]
milardovich has joined #ruby
fredjean has joined #ruby
mansi has joined #ruby
v1n has quit [Ping timeout: 248 seconds]
milardovich has quit [Max SendQ exceeded]
fredjean has quit [Client Quit]
subbyyy_ has joined #ruby
milardovich has joined #ruby
zets has joined #ruby
sergicles has quit [Read error: Connection reset by peer]
milardovich has quit [Max SendQ exceeded]
milardovich has joined #ruby
bradhe has quit [Remote host closed the connection]
sergicles has joined #ruby
bradhe has joined #ruby
ffranz has quit [Quit: Leaving]
slyv has joined #ruby
slyv has quit [Max SendQ exceeded]
bradhe has quit [Ping timeout: 264 seconds]
Vivekananda has quit [Read error: Operation timed out]
echevemaster has quit [Read error: Connection reset by peer]
echevemaster has joined #ruby
echevemaster has quit [Changing host]
echevemaster has joined #ruby
osvico has quit [Ping timeout: 246 seconds]
adeponte has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
kenneth has quit [Quit: kenneth]
fuhgeddaboudit has joined #ruby
zeropx has quit [Quit: has left the room … Or did he?]
kofno_ has joined #ruby
osvico has joined #ruby
cburyta has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
lys has quit [Quit: lys]
kasper has quit [Remote host closed the connection]
inimit has joined #ruby
robustus has quit [Ping timeout: 248 seconds]
DanKnox is now known as DanKnox_away
DanKnox_away is now known as DanKnox
robustus has joined #ruby
citizensinspace has joined #ruby
kofno_ has quit [Remote host closed the connection]
raposa has joined #ruby
cmhobbs has joined #ruby
io_syl has joined #ruby
raposa has left #ruby [#ruby]
raposa has joined #ruby
<cmhobbs>
i'm building a library that will initially require manual interaction (for oauth verification). what's the most appropriate way to stop and warn a developer when they first call the method that will ask them for more input?
forced_request has quit [Read error: Connection reset by peer]
raposa has left #ruby [#ruby]
<cmhobbs>
logging of somekind, i'd imagine?
BSaboia has quit [Ping timeout: 246 seconds]
raposa has joined #ruby
<cmhobbs>
seems janky to just throw a puts out there
<cmhobbs>
i guess i could just add a script to build a config for the developer, prompting them in the middle
diegoviola has joined #ruby
cj3kim has joined #ruby
NhiemBui has joined #ruby
kofno has joined #ruby
havenwood has joined #ruby
danshultz has joined #ruby
sarkis has quit [Ping timeout: 256 seconds]
<raposa>
what would the required action be? like - set an environment variable?
ttt has joined #ruby
Tobarja has joined #ruby
cburyta has quit [Remote host closed the connection]
<cmhobbs>
raposa, that code needs to be added to continue the process
<cmhobbs>
there's no real manual way to generate that
v0n has joined #ruby
fuhgeddaboudit has quit [Ping timeout: 240 seconds]
wmoxam has joined #ruby
<cmhobbs>
but the first time the developer uses the library, it'll have to have a config generated and that requires manual interaction
momomomomo has joined #ruby
citizensinspace has quit [Quit: citizensinspace]
krz has joined #ruby
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Tobarja_laptop has joined #ruby
marcdel has joined #ruby
havenwood has quit [Remote host closed the connection]
mickeyd has joined #ruby
Tobarja_laptop has quit [Client Quit]
fenicks has quit [Remote host closed the connection]
GeissT has joined #ruby
nbouscal has joined #ruby
fwaokda has quit [Ping timeout: 264 seconds]
twoism has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
nettoweb has joined #ruby
nowthatsamatt has joined #ruby
nowthatsamatt has quit [Client Quit]
reset has quit [Quit: Leaving...]
alvaro_o has quit [Quit: Ex-Chat]
atmosx has quit [Remote host closed the connection]
atmosx has joined #ruby
ntus1017 has joined #ruby
jonahR has quit [Ping timeout: 256 seconds]
Targen has joined #ruby
jjbohn has quit [Quit: Leaving...]
Domon has quit [Remote host closed the connection]
ehaliewicz has quit [Read error: No route to host]
Domon has joined #ruby
io_syl has quit [Ping timeout: 246 seconds]
fuhgeddaboudit has joined #ruby
wesside has joined #ruby
danbeck has quit [Quit: danbeck]
Vivekananda has joined #ruby
krainboltgreene has quit [Ping timeout: 264 seconds]
tommyvyo has joined #ruby
reset has joined #ruby
krainboltgreene has joined #ruby
bradhe has joined #ruby
fredjean has joined #ruby
fredjean has quit [Client Quit]
dhruvasagar has quit [Read error: Operation timed out]
jonahR has joined #ruby
jkline has quit [Quit: jkline]
vlad_starkov has joined #ruby
icco has quit [Ping timeout: 240 seconds]
Gooder has joined #ruby
axeman- has joined #ruby
wmoxam has quit [Ping timeout: 264 seconds]
Opettaja has joined #ruby
bradhe has quit [Ping timeout: 264 seconds]
mansi has quit [Remote host closed the connection]
icco has joined #ruby
jkline has joined #ruby
mansi has joined #ruby
Freeaqingme has quit [Read error: Operation timed out]
Freeaqingme has joined #ruby
blandflakes has quit [Ping timeout: 256 seconds]
vlad_starkov has quit [Ping timeout: 248 seconds]
tommyvyo has quit [Quit:]
Freeaqingme is now known as Guest29006
bradhe has joined #ruby
ssvo has joined #ruby
jorge has joined #ruby
hakunin_ is now known as hakunin
otherj has joined #ruby
haxrbyte has joined #ruby
haxrbyte has quit [Remote host closed the connection]
fredjean has joined #ruby
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
adeponte has joined #ruby
haxrbyte has joined #ruby
mansi has quit [Ping timeout: 246 seconds]
Astralum has quit [Ping timeout: 264 seconds]
fredjean has quit [Client Quit]
axeman- has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 248 seconds]
bradhe has joined #ruby
fuhgeddaboudit has quit [Ping timeout: 276 seconds]
nlv has joined #ruby
Guga_ has quit [Quit: ~]
adeponte has quit [Ping timeout: 246 seconds]
nlv has quit [Remote host closed the connection]
nowthatsamatt has joined #ruby
tommyvyo has joined #ruby
doug_carmichael has joined #ruby
icco has quit [Ping timeout: 256 seconds]
kasper has joined #ruby
ILoveYou[ has joined #ruby
icco has joined #ruby
eldariof has joined #ruby
Bry8Star{T2 has joined #ruby
hydrozen has joined #ruby
bionoid has joined #ruby
ILoveYou has quit [Ping timeout: 268 seconds]
nowthatsamatt has quit [Client Quit]
kasper has quit [Ping timeout: 246 seconds]
corehook has quit [Ping timeout: 240 seconds]
fuhgeddaboudit has joined #ruby
reset has quit [Quit: Leaving...]
ILoveYou[ has quit [Read error: Connection reset by peer]
ILoveYou has joined #ruby
djbkd has joined #ruby
sambao21 has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
fredjean has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
Vivekananda has quit [Ping timeout: 246 seconds]
cj3kim has joined #ruby
nettoweb has quit [Quit: nettoweb]
<voglster>
newbie question here.. i keep seeing myself write code that looks like this: http://pastebin.com/ziuJgfxq trying to follow DRY.. is there a better way to build an array and return it?
otherj has quit []
io_syl has joined #ruby
<voglster>
anyone alive?
<sevenseacat>
voglster: sounds like you need map.
fredjean has quit [Client Quit]
<sevenseacat>
arr_of_c.map(&:something)
tommyvyo has quit [Quit:]
<voglster>
yup exactly what i needed thanks!
icco has quit [Ping timeout: 240 seconds]
<voglster>
still not "thinking in ruby" yet...
fuhgeddaboudit has quit [Read error: Operation timed out]
icco has joined #ruby
sleetdrop has joined #ruby
tommyvyo has joined #ruby
rosario has joined #ruby
ILoveYou has quit [Read error: Connection reset by peer]
ILoveYou has joined #ruby
jorge has quit [Remote host closed the connection]
jorge has joined #ruby
browndawg has joined #ruby
danbeck has joined #ruby
kofno has quit [Remote host closed the connection]
ILoveYou has quit [Read error: Connection reset by peer]
danbeck has quit [Client Quit]
_seanc_ has quit [Quit: _seanc_]
Vivekananda has joined #ruby
ILoveYou has joined #ruby
leo_ has joined #ruby
gasbakid has joined #ruby
jorge has quit [Ping timeout: 240 seconds]
brennanMKE has quit [Remote host closed the connection]
ILoveYou has quit [Read error: Connection reset by peer]
momomomomo has quit [Quit: momomomomo]
raposa has quit [Quit: Leaving.]
c0rn has joined #ruby
ILoveYou has joined #ruby
icco has quit [Ping timeout: 252 seconds]
icco has joined #ruby
ILoveYou has quit [Read error: Connection reset by peer]
DanKnox is now known as DanKnox_away
ILoveYou has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
theRoUS has quit [Ping timeout: 248 seconds]
cj3kim has joined #ruby
superscott[8] has joined #ruby
Mattix has joined #ruby
finges has joined #ruby
fredjean has joined #ruby
ILoveYou has quit [Read error: Connection reset by peer]
adeponte has joined #ruby
ILoveYou has joined #ruby
mahmoudimus has joined #ruby
rosario has quit [Ping timeout: 240 seconds]
fuhgeddaboudit has joined #ruby
hydrozen has quit [Ping timeout: 248 seconds]
axeman- has joined #ruby
elentras has joined #ruby
ILoveYou has quit [Read error: Connection reset by peer]
tjbiddle_ has joined #ruby
Dekade has quit [Ping timeout: 246 seconds]
tjbiddle has quit [Ping timeout: 240 seconds]
tjbiddle_ is now known as tjbiddle
ILoveYou has joined #ruby
corehook has joined #ruby
DanKnox_away is now known as DanKnox
sambao21 has quit [Quit: Computer has gone to sleep.]
Mars^ has quit [Ping timeout: 246 seconds]
mnms has quit [Ping timeout: 268 seconds]
vlad_starkov has joined #ruby
sayan has joined #ruby
cjsarette has quit [Read error: Connection reset by peer]
Nisstyre has quit [Quit: Leaving]
jbueza has quit [Quit: Leaving.]
agjacome has quit [Quit: leaving]
buzzybron has joined #ruby
CaptainJet has quit []
CaptainJet has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
ehaliewicz has joined #ruby
fuhgeddaboudit has quit [Ping timeout: 248 seconds]
sleetdrop has quit [Quit: Computer has gone to sleep.]
Inside has quit [Ping timeout: 264 seconds]
arya__ has quit [Ping timeout: 248 seconds]
momomomomo has joined #ruby
jbueza has joined #ruby
jbueza has quit [Client Quit]
jonahR has quit [Ping timeout: 240 seconds]
_seanc_ has joined #ruby
<alainus>
An exit statement within a begin .. raise .. ensure .. end block, will always go to the ensure block before exiting ?
arya_ has joined #ruby
jonahR has joined #ruby
sindork has joined #ruby
<pontiki>
yes
krainboltgreene has quit [Ping timeout: 264 seconds]
dash_ has joined #ruby
kizzx2 has quit [Quit: Leaving.]
banjara has joined #ruby
<alainus>
thanks
goodgame has joined #ruby
ILoveYou has quit [Read error: Connection reset by peer]
jonahR has quit [Ping timeout: 264 seconds]
ILoveYou has joined #ruby
Vivekananda has quit [Read error: Operation timed out]
krainboltgreene has joined #ruby
eldariof has quit [Ping timeout: 264 seconds]
Domon has quit [Remote host closed the connection]
Deele has joined #ruby
jkline has quit [Quit: jkline]
daniel_hinojosa has quit [Quit: Leaving.]
wmoxam has joined #ruby
Mars^ has joined #ruby
yacks has quit [Read error: Connection reset by peer]
splittingred has quit [Quit: splittingred]
goodgame has quit [Remote host closed the connection]
Targen has quit [Ping timeout: 246 seconds]
DanKnox is now known as DanKnox_away
nbouscal has quit [Quit: Computer has commenced electric sheep tracking protocol.]
airlok has joined #ruby
syamajala has joined #ruby
wmoxam has quit [Ping timeout: 246 seconds]
syamajala has quit [Client Quit]
airlok has quit [Ping timeout: 276 seconds]
sleetdrop has joined #ruby
sleetdrop has quit [Max SendQ exceeded]
jonahR has joined #ruby
sleetdrop has joined #ruby
fwaokda has joined #ruby
wu_lmao has joined #ruby
citizensinspace has joined #ruby
mickeyd has quit [Ping timeout: 256 seconds]
Targen has joined #ruby
subbyyy_ has quit [Ping timeout: 264 seconds]
chriskk has quit [Quit: chriskk]
ILoveYou has quit [Read error: Connection reset by peer]
subbyyy_ has joined #ruby
yacks has joined #ruby
DrShoggoth has joined #ruby
dhruvasagar has joined #ruby
ILoveYou has joined #ruby
darth_chatri has joined #ruby
doug_carmichael has left #ruby ["Textual IRC Client: www.textualapp.com"]
leo_ has quit [Quit: Ex-Chat]
Bosox20051 has quit [Remote host closed the connection]
KTMBoID has quit [Remote host closed the connection]
locriani has joined #ruby
wudofyr___ has quit [Ping timeout: 264 seconds]
ILoveYou has quit [Read error: Connection reset by peer]
tonini has joined #ruby
gildo_ has quit [Ping timeout: 264 seconds]
Norrin has quit [Ping timeout: 260 seconds]
wookiehangover has quit [Ping timeout: 256 seconds]
ILoveYou has joined #ruby
yellow5 has quit [Ping timeout: 268 seconds]
kenneth has joined #ruby
momomomomo has quit [Quit: momomomomo]
Norrin has joined #ruby
yellow5 has joined #ruby
kizzx2 has joined #ruby
cha1tanya has joined #ruby
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
ILoveYou has quit [Read error: Connection reset by peer]
ILoveYou has joined #ruby
browndawg has quit [Read error: Operation timed out]
subbyyy_ has quit [Ping timeout: 276 seconds]
vlad_starkov has joined #ruby
ner0x has quit [Quit: Leaving]
wookiehangover has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
wudofyr___ has joined #ruby
anay has joined #ruby
twoism has quit [Remote host closed the connection]
cads has quit [Read error: Operation timed out]
Kruppe has quit [Remote host closed the connection]
r0bgleeson has quit [Quit: WeeChat 0.3.8]
axeman- has quit [Remote host closed the connection]
axeman- has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
rlb3 has quit [Ping timeout: 246 seconds]
filipe_ has joined #ruby
mnms has joined #ruby
DanKnox_away is now known as DanKnox
filipe has quit [Ping timeout: 246 seconds]
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
axeman- has quit [Remote host closed the connection]
<Paradox>
any warnings against using em-synchrony for a new project?
<Paradox>
(threaded eventmachine)
axeman- has joined #ruby
cads has joined #ruby
tvw has joined #ruby
ILoveYou has quit [Read error: Connection reset by peer]
Mars^ has quit [Ping timeout: 246 seconds]
ILoveYou has joined #ruby
Vivekananda has joined #ruby
inimit has quit [Quit: inimit]
cmhobbs has quit [Ping timeout: 246 seconds]
Domon has joined #ruby
nomenkun has joined #ruby
druonysus has joined #ruby
druonysus has joined #ruby
druonysus has quit [Changing host]
danslo has quit [Quit: danslo]
nomenkun has quit [Remote host closed the connection]
MrZYX is now known as MrZYX|off
wallerdev has quit [Quit: wallerdev]
ILoveYou has quit [Read error: Connection reset by peer]
wargasm has quit [Read error: Connection reset by peer]
<bnagy>
I looked at synchrony, but ended up just threadpooling
codecop has joined #ruby
DanKnox is now known as DanKnox_away
bionoid has quit [Remote host closed the connection]
CaptainJet_ has joined #ruby
CaptainJet has quit [Disconnected by services]
airlok has joined #ruby
tylersmith has quit [Remote host closed the connection]
Targen has quit [Ping timeout: 240 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
c0rn has quit [Quit: Computer has gone to sleep.]
ananthakumaran has joined #ruby
swordsmanz has joined #ruby
airlok has quit [Ping timeout: 264 seconds]
vlad_starkov has joined #ruby
Mars^ has joined #ruby
ILoveYou has quit [Read error: Connection reset by peer]
poseid has joined #ruby
ILoveYou has joined #ruby
<buzzybron>
what's the best way to handle bulk inserts/updates in ruby? i'm doing a batch app, using sql statements, no ARs but i am concern with the amount of IDs i am loading, reading it from a file and loading to append it to sql statement, is there a better more efficient way?
<bnagy>
doesn't sound like anything to do with ruby
<bnagy>
it's going to depend on your DB and the ruby code driving it
saintcajetan has quit [Remote host closed the connection]
<bnagy>
all the ones I have worked with support a bulk insert / set whatever
swordsmanz has quit [Quit: swordsmanz]
swordsmanz has joined #ruby
rezzack has quit [Quit: Leaving.]
JohnBat26 has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.1]
anay has quit [Remote host closed the connection]
nari has quit [Ping timeout: 245 seconds]
<pontiki>
buzzybron: the best way to import a ton of data at once is with a import sql statement
<pontiki>
the LOAD DATA statement specifically
<pontiki>
and if you don't mind using a cli tool, there is mysqlimport
ILoveYou[ has joined #ruby
saintcajetan has joined #ruby
<buzzybron>
hmm i'm actually using postgres
axeman- has quit [Remote host closed the connection]
anay has joined #ruby
<pontiki>
i am sure pg has something similar
axeman- has joined #ruby
codeplay has joined #ruby
axeman- has quit [Remote host closed the connection]
matematikaadit has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
threesome has joined #ruby
ILoveYou has quit [Ping timeout: 276 seconds]
poseid has quit [Quit: poseid]
<buzzybron>
pontiki : can you describe what you are saying? for the load data part, how does it work?
atno has quit [Ping timeout: 264 seconds]
axeman- has joined #ruby
axeman- has quit [Remote host closed the connection]
romockee has joined #ruby
<pontiki>
can i jut spoint you at the documentation?
<pontiki>
load data take data from a file and loads into a table
<pontiki>
mysqlimport is cli proggy the just implements load data
<pontiki>
load data is ace at taking csv files and sucking them in
amh345 has joined #ruby
anay_ has joined #ruby
anay has quit [Read error: Connection reset by peer]
gasbakid has quit [Read error: Connection reset by peer]
<buzzybron>
nice thanks! just about right for my tasks i thinks lol i'll go read up on what postgres has to offer
<amh345>
I'm using CSV.open to write my csv file. works fine. but i'd like to encrypt it using open3 (Open3.popen3 "gpg….) is there a way to combine these two?
vlad_starkov has quit [Read error: Connection reset by peer]
nari has joined #ruby
vlad_starkov has joined #ruby
sayan has quit [Ping timeout: 264 seconds]
<amh345>
i've done this elsewhere. but instead of using CSV I'm just writing it to an array and then using stdin.write some_array
<pontiki>
um
<pontiki>
yeah...
<pontiki>
hmm
_seanc_ has quit [Quit: _seanc_]
<amh345>
i understand they are very different things, as the options for CSV don't include something like this.
<amh345>
so, I'm just curious.
<pontiki>
yeah, you can us an IO object in CSV.open
<pontiki>
which Open3 should deliver up for it's stdin
<pontiki>
idk, i haven't done this, but i'm pretty sure it will work
CaptainJet_ has quit []
rosario has joined #ruby
<pontiki>
so i think what you do is call Open3.popen3 first, and have it yield up the stdin, stdout, and stderr, and then call CSV.open with stdin to write to it
superscott[8] has quit [Quit: superscott[8]]
<amh345>
hrm. just checked the docs. csv = CSV.new(io, options)
<pontiki>
CSV.open takes an io as well
<amh345>
I'm trying to figure out if i should figure this out.. or just do it the other way i know. heh. so tired.
<amh345>
thanks for pointing me in the right direction
<pontiki>
well, there's an easy way
<pontiki>
two step operation, right?
<amh345>
yeah. i could two step.
<pontiki>
do what works first
<pontiki>
then refactor
<amh345>
but i prefer to just not have it written as plain txt at all.
<amh345>
written to disk, i should say.
<amh345>
if that's what you're referring to with 2 step
<alainus>
I have a file with data that has this format: Value 1 : Value2 : Value3 \n
<alainus>
Value4 : Value5 : Value6 \n
<alainus>
etc.
anay_ has quit [Remote host closed the connection]
<alainus>
What's the best function to read and write it?
ILoveYou[ has quit [Ping timeout: 276 seconds]
anay has joined #ruby
<amh345>
csv?
<amh345>
not a lot of info.
<amh345>
is that literally how you want it to appear?
Mars^ has quit [Ping timeout: 240 seconds]
anay has quit [Remote host closed the connection]
cantonic has quit [Quit: cantonic]
<pontiki>
yeah, amh345 -- write to disk with CSV.open, then gpg that with a system call
<pontiki>
if you have time to investigate though
dodosan has quit [Remote host closed the connection]
<amh345>
i see this. CSV { |csv_out| csv_out << %w{my data here} } # to $stdout in the docs.
nomenkun has joined #ruby
hamed_r has joined #ruby
sergicles has quit [Read error: Connection reset by peer]
<pontiki>
the other option seems awesomer :)
ayaz has joined #ruby
<pontiki>
shouldn't take much to see if it works, really
anay has joined #ruby
huoxito has quit [Quit: Leaving]
<amh345>
yeah %w{} always messes with my syntax colours.
<amh345>
i think i might be blind. but I'm not seeing anything in the docs for CSV.open and io
sergicles has joined #ruby
anay has quit [Read error: Connection reset by peer]
Opettaja has quit [Remote host closed the connection]
<pontiki>
hmm
<pontiki>
no, you're right
<pontiki>
i says filename specifically
vlad_starkov has quit [Ping timeout: 240 seconds]
<pontiki>
so , yeah, use CSV.new instead
twoism has quit [Remote host closed the connection]
apeiros has joined #ruby
twoism has joined #ruby
ssvo has quit [Ping timeout: 264 seconds]
anay has joined #ruby
poseid has joined #ruby
<amh345>
this looks like it's a substantial rewrite.. if I'm reading this correctly.
Mon_Ouie has joined #ruby
krainbol_ has joined #ruby
CaptainJet has joined #ruby
<amh345>
unless I'm nuts. i have to pass all the data to csv.new and i can no longer do things like csv << headers << csv_content etc
citizensinspace has quit [Quit: citizensinspace]
<amh345>
oh. wait. hm
krainboltgreene has quit [Ping timeout: 276 seconds]
ayonix has quit [Quit: cya]
ayonix has joined #ruby
corehook has quit [Read error: Connection reset by peer]
milardovich has quit [Quit: Leaving]
postmodern has joined #ruby
obs has joined #ruby
pranny has joined #ruby
milardovich has joined #ruby
Gooder` has joined #ruby
saintcajetan has quit [Ping timeout: 240 seconds]
Rokko_11 has joined #ruby
airlok has joined #ruby
Rokko_11 has left #ruby [#ruby]
twoism has quit [Ping timeout: 240 seconds]
Gooder has quit [Ping timeout: 240 seconds]
andikr has joined #ruby
browndawg has quit [Ping timeout: 264 seconds]
<pontiki>
i think you can still
zodiak has quit [Ping timeout: 248 seconds]
airlok has quit [Ping timeout: 276 seconds]
<pontiki>
it doesn't look like CSV.new takes a block thouh
<pontiki>
so you need to ensure it get closed properly
<apeiros>
you can use CSV with a block. maybe not CSV.new, though
nomenkun has quit [Remote host closed the connection]
persand has joined #ruby
relix has joined #ruby
<Paradox>
bnagy, reddit bot
<Paradox>
sorry for the delay
<Paradox>
had to put out the cat
<Paradox>
i have a dumb proceedural one
ffio has joined #ruby
mickeyd has joined #ruby
<Paradox>
that i wrote one evening because i was fed up with spammers
<Paradox>
and its grown too far
<Paradox>
so i need to redo it properly
codecop has quit [Remote host closed the connection]
poseid has quit [Quit: poseid]
Iszak has joined #ruby
<apeiros>
pontiki: `CSV.open("path/to/file.csv", "wb") do |csv|` straight from the `ri CSV` docs.
codecop has joined #ruby
fwaokda has quit [Ping timeout: 240 seconds]
<apeiros>
hm, you want to write to an IO, not a file, I see
<apeiros>
should work with the shortcut interface, though: `CSV($stderr) { |csv_err| csv_err << %w{my data here} }` from the same docs
adeponte has quit [Remote host closed the connection]
samuel02 has joined #ruby
<Paradox>
bnagy, mainly i want threading because i want to have a pool, queue, and not have to worry about blocking
<Paradox>
because reddit has api limits
<Paradox>
so i figured pool that does work on results from requests, a queue that handles outgoing requests, and a periodic timer every 2 seconds that pops from the outgoing queue
<pontiki>
apeiros: that writes to the file
m4rcu5 has joined #ruby
<apeiros>
pontiki: see the second paste
<apeiros>
$stderr is an IO, so it should work for any IO.
<pontiki>
interestingg
vlad_starkov has joined #ruby
robbyoconnor has quit [Read error: Connection reset by peer]
<krz>
given #<URI::HTTPS:0x007ffabd74c268 URL:https://foobar.s3.amazonaws.com/uploads/users/160355/videos/1074/caqu_youtube.mp4?AWSAccessKeyId=AKOAJXDP153ZMQ7QVLUR&Expires=1373445713&Signature=AT4WsU7RQ7YcHdV65v3dpE9y%2B6c%3D> how do i get the URL part?
<amh345>
oh wow. i was getting ready for bed. checked irc and saw your post pontiki . this is awesome. thank you for taking the time to look at it.
<Akuma>
regular expressions
<sevenseacat>
sudo for gems? really? :(
<pontiki>
did you you install rvm at the system level, akuma?
<Akuma>
it wasn't installing otherwise
<Akuma>
no
<Akuma>
user level
<krz>
Akuma: was that for me?
<Akuma>
krz: yes, regular expressions would help you getting the URK
<Akuma>
URL
<pontiki>
Akuma: do me a favour, go over to #rvm and talk to the folks over there; they're interested in the problems folks are having
<pontiki>
(really)
<Guest51446>
@ pontiki please help me in this regard just take a sample code in text where to add which part,please send me a text mail to hkrk123@gmail.com
<pontiki>
no, Guest51446
<sevenseacat>
lol
<Guest51446>
let me clear yar
<sevenseacat>
its been a while since i've seen a literal 'send me the codez'
<pontiki>
Guest51446: how many ways can i say "no" until you get it?
<pontiki>
you need to study
<pontiki>
no easy answers
<pontiki>
no free code that you won't understand
<pontiki>
no doing your work for you
<pontiki>
unless you wish to pay me
jorge has joined #ruby
<pontiki>
my hourly rate is $120/hr
<epitron>
problem: i need to extract some bzip2 data from within a file, then pipe it to bunzip2 in ruby, then read its output (preferably straeming). unfortunately, i can't manage to make it work with popen or open3
byprdct has joined #ruby
<bnagy>
pontiki: it's zshaw's 'the hard way' series ruby.learncodethehardway.com or something similar
vigintas has joined #ruby
<pontiki>
epitron: would one of the pipline commands me better than popen?
<epitron>
if i try writing the data to the bunzip2 process' standard input, bunzip2 receives the data, decompresses it, fills up its output buffer, then just stops
<epitron>
pontiki: pipeline commands!
<epitron>
that sounds like what i want :)
<pontiki>
same package, Open3
end_guy has quit [Remote host closed the connection]
statarb3 has joined #ruby
statarb3 has joined #ruby
<Guest51446>
@ how can you get the pay
<epitron>
pontiki: hmm... all i actually need is to be able to let ruby write data into bunzip2, then read its output
<epitron>
this seems to be for chaining commands
<epitron>
neat, nonetheless :)
<pontiki>
hmm
<epitron>
maybe i want capture2
<pontiki>
maybe?
<pontiki>
i'm really actually unclear
<pontiki>
bunzip2 | ruby myfilter ?
Maoko has joined #ruby
<pontiki>
do you need to do it all from inside ruby?
<bnagy>
epitron: you might find it easier to understand if you use open3
<pontiki>
does that work, epitron ? you can extract a segment from the middle of a compressed file?
nnww has quit [Ping timeout: 240 seconds]
<pontiki>
capture2 is part of the open3 lib
maxmanders has joined #ruby
<waxjar>
ruby extract_stuff.rb | bunzip2 and write bz2_data to STDOUT instead of to i ?
<bnagy>
like you do Open3.popen3(something) {|s_in, s_out, s_err| do stuff
marr has joined #ruby
maxmanders has quit [Client Quit]
nnww has joined #ruby
<epitron>
pontiki: it works because that's how the file is structured :)
<epitron>
it's a pile of bz2's smashed together
<pontiki>
s_out, st = Open3.capture2(cmd)
<pontiki>
ah, ok :)
maxmanders has joined #ruby
<epitron>
only downside here is that i'd like a streaming IO as the output
klaas_ is now known as klaas
<epitron>
i guess it doesn't matter that much
timonv has quit [Remote host closed the connection]
<pontiki>
that's where the popen's come in
<pontiki>
well
<pontiki>
yielding a block anywhay
poseid_ has joined #ruby
<epitron>
bnagy: so the problem with that was that if i did "s_in.write bz2_data", write would never return, since bunzip2 would clog up its output buffer and block before it finished processing all of its standard input
monkegjinni has joined #ruby
<epitron>
i guess i could use write_nonblock
bakingbread has joined #ruby
shaunbaker has joined #ruby
<epitron>
i'd like to avoid having to do some crazy shenanigans to just pump data into a program :)
<epitron>
maybe i should do a stream_copy from a StringIO
<bnagy>
you can stream or thread
<epitron>
is that how you'd do a stream?
<pontiki>
actually, yeah, i'd go to a streamIO
<epitron>
StringIO, you mean?
adeponte has joined #ruby
jorge has quit [Remote host closed the connection]
invsblduck is now known as invsblduck_zzz
jorge has joined #ruby
<epitron>
oh nice!
<epitron>
copy_stream has offset and length params
_veer has quit [Read error: Connection reset by peer]
ferdev has joined #ruby
bubblehead has quit [Read error: Connection reset by peer]
maxmanders has quit [Client Quit]
thepumpkin has joined #ruby
bubblehead has joined #ruby
maxmanders has joined #ruby
goshakkk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Zai00 has joined #ruby
Kabaka has joined #ruby
timonv has joined #ruby
flaritycat has quit [Remote host closed the connection]
<pontiki>
nini all
atmosx has joined #ruby
<MrZYX>
Guest51446: your brain
gildo_ has joined #ruby
Vivekananda has quit [Read error: Operation timed out]
ferdev has quit [Ping timeout: 246 seconds]
goshakkk has joined #ruby
krainbol_ has quit [Quit: krainbol_]
<epitron>
Guest51446: #rubyonrails is a good resource
<bnagy>
or #anywherebuthere
bubblehead has quit [Read error: Connection reset by peer]
<MrZYX>
bnagy: but that's mean for #anywherebuthere :(
io_syl has quit [Ping timeout: 264 seconds]
bubblehead has joined #ruby
banjara has joined #ruby
Matip has joined #ruby
lkba has quit [Ping timeout: 264 seconds]
io_syl has joined #ruby
monkegjinni has quit [Remote host closed the connection]
ferdev has joined #ruby
Kabaka has quit [Excess Flood]
tbn has joined #ruby
senayar has joined #ruby
Kabaka has joined #ruby
Mattix has quit [Ping timeout: 248 seconds]
cabotto has joined #ruby
enherit has quit [Ping timeout: 264 seconds]
Iszak has quit [Quit: Computer has gone to sleep.]
dodosan has quit [Remote host closed the connection]
cabotto has quit [Quit: cabotto]
fixl has joined #ruby
catphish has joined #ruby
<catphish>
is it possible to have String#encode recover from encoding errors and continue with the rest of the string? i am already using :invalid => :replace, :undefined => :replace but invalid sequences abort the whole process
goshakkk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bradhe has joined #ruby
pwnfactory has joined #ruby
<MrZYX>
it's :undef
<MrZYX>
and maybe try setting :fallback too
MindSpark has joined #ruby
pyrac has quit [Quit: pyrac]
trepidaciousMBR has joined #ruby
<catphish>
MrZYX: using :undef instead of :undefined fixed the problem! thanks!
<catphish>
either i pasted a bad example or i'm just a moron, thanks :)
chxane has quit [Quit: Leaving]
dEPy has joined #ruby
ferdev has quit [Ping timeout: 264 seconds]
pyrac has joined #ruby
jmimi has joined #ruby
BizarreCake has joined #ruby
byprdct has quit [Max SendQ exceeded]
Maoko has quit [Read error: Connection reset by peer]
ferdev has joined #ruby
persand has quit [Quit: persand]
bradhe has quit [Ping timeout: 256 seconds]
persand has joined #ruby
gstamp has quit [Quit: Computer has gone to sleep.]
<Guest51446>
is there any gem for automatic javascript in rails4
<pcarrier>
would be nice if the * operator just worked :)
<pcarrier>
(I had tried just * and it failed)
razi has joined #ruby
icco has joined #ruby
<codeplay>
pcarrier: you can do operator overloading for * on Array for your purpose.
fgo has joined #ruby
<pcarrier>
codeplay: I'm not monkey patching, but thanks :)
hogeo_ has quit [Remote host closed the connection]
bubblehead has quit [Read error: Connection reset by peer]
Zai00 has quit [Read error: No route to host]
<codeplay>
pcarrier: Apologies but seeing your doubt I though this direction would be helpful.
ryanjh has joined #ruby
bubblehead has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
<pcarrier>
codeplay: nah, I'd love that to be part of the standard library, but Array fits in the category of classes I wouldn't monkey-patch outside of a simple script (and this is for a chef recipe)
browndawg has quit [Ping timeout: 264 seconds]
redgirl has joined #ruby
obs has quit [Quit: Konversation terminated!]
Domon has quit [Ping timeout: 246 seconds]
<Hanmac1>
imo its a bad habbit to monkeypatch the core classes … there are also some classes where the instances are frozen in newer ruby versions
Guest6063 has quit [Quit: Quit]
Guest98791 is now known as machuga_
<swistak35>
could someone explain me, why following code: [["B",1,2],["A",2,3]].inject(Hash.new) {|hash, arr| hash.store(arr[0], arr[1..-1]) } isn't creating hash {"B": [1,2], "A": [2,3] } ? Because there is some magic involved
obs has joined #ruby
jokke has quit [Ping timeout: 270 seconds]
machuga_ is now known as machuga|away
machuga|away is now known as machuga_
Spami has quit [Quit: This computer has gone to sleep]
<Hanmac1>
swistak35: because inject returns uses the result if the last iteration, you want each_with_object
<swistak35>
hanmac1: well, thanks, I thought #store will return hash, but of course it's returning new value, that's why it didn't work
<pwnfactory>
swistak35: what hanmac1 said, or if you'd like to continue with #inject, it'd be [["B",1,2],["A",2,3]].inject(Hash.new) {|hash, arr| hash.store(arr[0], arr[1..-1]); hash }
browndawg has joined #ruby
kizzx2 has quit [Quit: Leaving.]
<swistak35>
pwnfactory: I will stick with each_with_object, "; hash" is a little bit ugly, but it's good to have these two "forms" of folding in ruby : )
lewix has quit [Remote host closed the connection]
Notte has joined #ruby
huttan has quit [Remote host closed the connection]
jokke has joined #ruby
bradhe has joined #ruby
snearch has joined #ruby
Zai00 has joined #ruby
anay has quit [Remote host closed the connection]
gregchapple has joined #ruby
anay has joined #ruby
icco has quit [Read error: Operation timed out]
bradhe has quit [Ping timeout: 256 seconds]
obs has quit [Quit: Konversation terminated!]
anay_ has joined #ruby
<apeiros>
pwnfactory, swistak35: IMO abuse of inject. use each_with_object
obs has joined #ruby
<apeiros>
then you don't need `; hash`
<pwnfactory>
apeiros: agreed, just offering why swistak35's code wasn't working
<apeiros>
alternatively use Hash[] + map
<apeiros>
probably faster anyway
Hanmac1 has quit [Quit: Leaving.]
<apeiros>
e.g. Hash[your_array.map { |key, *value| [key, value] }]
anay has quit [Read error: Connection reset by peer]
camilasan has quit [Remote host closed the connection]
yashshah has quit [Ping timeout: 246 seconds]
Zolo has joined #ruby
ryanjh is now known as RyanHirsch
MindSpark has quit [Quit: MindSpark]
joshu has quit [Ping timeout: 264 seconds]
persand has quit [Quit: persand]
alem0lars has joined #ruby
camilasan has joined #ruby
joshu has joined #ruby
echevemaster has quit [Remote host closed the connection]
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
cj3kim has joined #ruby
jbpros has quit [Quit: jbpros]
pyrac has quit [Quit: pyrac]
gregchapple has quit [Quit: leaving]
MindSpark has joined #ruby
platzhirsch has joined #ruby
elentras has quit [Quit: Leaving...]
Hanmac1 has joined #ruby
echevemaster has joined #ruby
echevemaster has quit [Changing host]
echevemaster has joined #ruby
cj3kim has quit [Ping timeout: 276 seconds]
browndawg has left #ruby [#ruby]
camilasan has quit [Ping timeout: 256 seconds]
ghr has joined #ruby
Zolo has quit [Remote host closed the connection]
DaniG2k has quit [Read error: No route to host]
icco has joined #ruby
alexspeller has joined #ruby
77CAAKLE3 has joined #ruby
lushious has joined #ruby
Caius has joined #ruby
soulcake has joined #ruby
Deele has joined #ruby
gadgetoid has joined #ruby
Caius has quit [Changing host]
Caius has joined #ruby
soulcake has quit [Changing host]
soulcake has joined #ruby
yashshah has joined #ruby
timmow has joined #ruby
jeekl has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
anay_ has quit [Ping timeout: 248 seconds]
atno has quit [Ping timeout: 256 seconds]
AlbireoX has quit [Remote host closed the connection]
persand has joined #ruby
Nakilon has quit [Ping timeout: 264 seconds]
nettoweb has joined #ruby
jibi has quit [Quit: .]
ehaliewicz has quit [Ping timeout: 256 seconds]
<buzzybron>
elementary question here, i have a string and i need to pass in some var in a loop, how can i do that? like a placeholder
emergion has joined #ruby
emergion has quit [Max SendQ exceeded]
<hoelzro>
buzzybron: what are you trying to do?
<hoelzro>
I'm not sure I understand your question
emergion has joined #ruby
codesoda has joined #ruby
ILoveYou has joined #ruby
anay has joined #ruby
anay has quit [Remote host closed the connection]
<buzzybron>
say i have this string "this is a '#{country}' string", how can i store this as a var and loop through replace the country
<MrZYX>
loop through what?
<Hanmac1>
buzzybron: "partofstring#{iterationvalue}" or "partofstring%d" % iterationvalue
banjara has quit [Max SendQ exceeded]
<hoelzro>
oh, like a template?
<hoelzro>
that's a good question
* hoelzro
waits and listens
banjara has joined #ruby
<MrZYX>
buzzybron: still not enough information? you have an array with values to interpolate and want an array with the result back or...?
<hoelzro>
MrZYX: I assume buzzybron wants something like this:
camilasan has joined #ruby
<hoelzro>
%w(Germany USA Netherlands).each { |country| do_something_with("this is a '#{country}'") }
<buzzybron>
hoelzro : yes like a template
<hoelzro>
but he/she wants to store that interpolated string in a varaible
<buzzybron>
pardon me went away for a bit
<hoelzro>
*variable
<hoelzro>
and perform the interpolation later
<hoelzro>
I'm curious for the answer myself
<hoelzro>
I mean, you could use gsub
<hoelzro>
that'd do it
<buzzybron>
wow nice, i mean i am trying to avoid regex/gsub although i could really do that
<MrZYX>
hanmac1: answered already but to make it clear: template = "this is a '%s'"; %w(Germany USA Netherlands).map { |country| template % country }
<hoelzro>
that also works
<hoelzro>
;)
<Hanmac1>
>> %w(Germany USA Netherlands).map("this is a '%s'".method(:%))
<eval-in>
hanmac1 => wrong number of arguments (1 for 0) (ArgumentError) ... (https://eval.in/37174)
<Hanmac1>
>> %w(Germany USA Netherlands).map(&"this is a '%s'".method(:%))
<eval-in>
hanmac1 => ["this is a 'Germany'", "this is a 'USA'", "this is a 'Netherlands'"] (https://eval.in/37175)
<buzzybron>
ok i'm confused
<MrZYX>
yeah and that's the "what the hell is going on" way
BSaboia has joined #ruby
jonahR has quit [Quit: jonahR]
codeplay has quit [Ping timeout: 250 seconds]
kindjal has joined #ruby
echevemaster has quit [Ping timeout: 264 seconds]
<buzzybron>
ah crap
<buzzybron>
what the hell am i doing
alem0lars has quit [Ping timeout: 264 seconds]
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
sleetdrop has quit [Ping timeout: 264 seconds]
<buzzybron>
damn, anyway i am doing a sql statement for my batch prog
cdnsteve has joined #ruby
<MrZYX>
uh, oh, don't you have a client lib that can do the interpolation for you?
<buzzybron>
hmm i am using pg gem so
smlgs has quit [Remote host closed the connection]
<hoelzro>
wait, what?
<hoelzro>
why don't you just use parameterized queries?
YaNakilon has joined #ruby
<MrZYX>
yeah, seriously
elentras has joined #ruby
<buzzybron>
er how do i do that
<MrZYX>
doing it by hand will only go wrong
<buzzybron>
i am very very new to this ruby thing
<buzzybron>
like 3 weeks new
<tobiasvl>
and to programming in general?
haxrbyte has joined #ruby
<buzzybron>
hmm not really but yea usually i'd be using something like an active record util, i can't seem to locate pg gem resource
<buzzybron>
as in the docs... i don't read them well
<buzzybron>
any suggestions
haxrbyte_ has joined #ruby
<buzzybron>
hmm?
bradhe has joined #ruby
niceguyjames has quit [Quit: Computer has gone to sleep.]
<MrZYX>
well if you're looping the best way is to use a prepared statement
<buzzybron>
hmm you are saying the pg method prepare_statement or storing the statement in a var first?
<ChristianS>
is there a way to make String#downcase and friends work for arbitrary unicode letters?
<ChristianS>
i know i can use UnicodeUtils.downcase but it feels a little clumsy
<MrZYX>
buzzybron: connection.prepare("some_name", "INSERT INTO foo (a, b, c) VALUES ($1, $2, $3)") -> loop -> connection.exec_prepared("some_name", [a_var, b_var, c_var])
gildo_ has quit [Ping timeout: 256 seconds]
<MrZYX>
if I got the examples through some quick googling right
lkba has quit [Ping timeout: 264 seconds]
<MrZYX>
never used it directly yet
haxrbyte has quit [Ping timeout: 248 seconds]
<buzzybron>
i've tried that... actually, can't seem to get it working
vinnyOcean has joined #ruby
cdnsteve has left #ruby [#ruby]
bradhe has quit [Ping timeout: 276 seconds]
pyrac has joined #ruby
<buzzybron>
lemme try that again
buzzybron has quit [Quit: Leaving.]
flurick has left #ruby [#ruby]
nettoweb has quit [Quit: nettoweb]
anay has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
anay has quit [Remote host closed the connection]
anay has joined #ruby
cmhobbs has joined #ruby
cmhobbs has quit [Changing host]
cmhobbs has joined #ruby
anay has quit [Read error: Connection reset by peer]
airlok has joined #ruby
cofin has joined #ruby
freerobby has joined #ruby
<pwnfactory>
I'm looking at the new ways to call a proc
persand has quit [Read error: Connection reset by peer]
iamjarvo has quit [Quit: Leaving.]
ttt has quit [Remote host closed the connection]
persand has joined #ruby
<Liothen>
funny enough i inserted that bit of code into my own project and its logging fine, are you haveing other errors in your development.log?
Guest29006 is now known as Freeaqingme
kindjal has quit [Ping timeout: 248 seconds]
tonini has quit [Remote host closed the connection]
pyrac has joined #ruby
<Liothen>
where is the api_request? defined?
bradhe has joined #ruby
<Liothen>
if the method is missing it will not trigger that whoe block of code
danshultz has joined #ruby
breakingthings has joined #ruby
cantonic has joined #ruby
<Liothen>
never mind i found it at line 520
paolooo has joined #ruby
<Bauer1>
Liothen: the only clue I have is WARNING: Can't verify CSRF token authenticity which comes before the log of line 90, and that happens only during a POST api call which creates a new issue
carloslopes has joined #ruby
bradhe has quit [Ping timeout: 264 seconds]
<Bauer1>
Liothen: I am not convinced the fact api_request block on line 77 is the blame, but something on line 98 authenticate_with_http_basic do |username, password|
goshakkk has joined #ruby
cantonic has quit [Ping timeout: 264 seconds]
goshakkk has quit [Client Quit]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
paolooo has quit [Ping timeout: 250 seconds]
ay has joined #ruby
jprovazn has joined #ruby
johnmilton has joined #ruby
cj3kim has joined #ruby
cantonic has joined #ruby
<Liothen>
hmm
cj3kim has quit [Read error: Connection reset by peer]
D4T has joined #ruby
Giorgio has quit [Ping timeout: 256 seconds]
ephemerian has quit [Quit: Leaving.]
cads has quit [Ping timeout: 256 seconds]
<Liothen>
comment out "protect_from_forgery"
binw has joined #ruby
<Liothen>
do not do that for production but maybe its preventing the headers from being sent
camilasan has quit [Remote host closed the connection]
tk_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<Bauer1>
Liothen: hmmm but the password is not in the headers, its coming like: http://user:passs@redmine.com/issues.xml
Giorgio has joined #ruby
<Liothen>
Bauer1, rails normally filters out params[:password]
<apeiros>
Bauer1: that form of url is strongly disadvised and non-standard
ay has quit [Quit: leaving]
vlad_starkov has joined #ruby
nnww has quit [Read error: Connection reset by peer]
sleetdrop has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
pranny has joined #ruby
fgo has joined #ruby
pranny has quit [Client Quit]
Xeago_ has quit [Remote host closed the connection]
kindjal has joined #ruby
devoldmx has quit [Ping timeout: 248 seconds]
Liothen has quit [Quit: System of a down……]
huoxito has joined #ruby
kofno has quit [Remote host closed the connection]
nettoweb has joined #ruby
<Bauer1>
well commenting out protect_from_forgery didnt change anything.. apeiros: how would you suggest I send the user/pass? I can modify the code which does this as well
renderful has quit [Write error: Connection reset by peer]
platzhirsch has joined #ruby
theRoUS has joined #ruby
DylanJ has joined #ruby
jztech101_ has joined #ruby
NsOmNiAc has quit [Ping timeout: 268 seconds]
NsOmNiAc has joined #ruby
abstrusenick has quit [Quit: abstrusenick]
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
Elgin has joined #ruby
citizensinspace has quit [Ping timeout: 247 seconds]
geekbri_ has quit [Ping timeout: 247 seconds]
citizensinspace_ is now known as citizensinspace
krishna has quit [Ping timeout: 247 seconds]
mrfoo has quit [Ping timeout: 250 seconds]
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
binaryplease has joined #ruby
krishna has joined #ruby
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
JZTech101 has quit [Ping timeout: 273 seconds]
sayan has joined #ruby
<Bauer1>
apeiros: I cant join #rubyonrails at the moment.. do you happen to know how to pass the user/pass via the POST params? as in, what name/value pairs to for authenticate_with_http_basic do |username, password| to work?
MrThePlague has joined #ruby
freerobby has joined #ruby
realDAB has joined #ruby
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
justinmcp has joined #ruby
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
asobrasil has joined #ruby
bubblehe_ has quit [Read error: Connection reset by peer]
asobrasil has quit [Max SendQ exceeded]
bubblehead has joined #ruby
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
ffranz has joined #ruby
mansi has joined #ruby
senayar has joined #ruby
zeromodu_ has joined #ruby
Adawerk_ has joined #ruby
fivethre1o has joined #ruby
browndawg has left #ruby [#ruby]
geekbri_ has joined #ruby
grn_ has joined #ruby
cmarques_ has joined #ruby
wsterlin_ has joined #ruby
BeLucid_ has joined #ruby
sarkis has joined #ruby
mikecmpb_ has joined #ruby
jinief has quit [Ping timeout: 245 seconds]
Niamkik_ has joined #ruby
julweber has quit [Remote host closed the connection]
nemesit|znc has joined #ruby
Guga_ has quit [Ping timeout: 240 seconds]
kindjal has joined #ruby
sarkis has quit [Client Quit]
dv__ has joined #ruby
fumduq has joined #ruby
mengu_ has joined #ruby
realDAB_ has joined #ruby
Coolhand_ has joined #ruby
Sp4rKy has quit [Ping timeout: 268 seconds]
camilasan has joined #ruby
epta_ has joined #ruby
crankyco1er has joined #ruby
pietr0_ has joined #ruby
Jb___ has joined #ruby
Notte has joined #ruby
PaulePan1er has joined #ruby
interactionjaxsn has quit []
NsOmNiAc_ has joined #ruby
Gate_ has joined #ruby
oddraisin has joined #ruby
monban_ has joined #ruby
matti_ has joined #ruby
alo1 has joined #ruby
sami has joined #ruby
twinkleH1od has joined #ruby
sarkis has joined #ruby
devoldmx has joined #ruby
cofin has quit [Quit: cofin]
cmarques_ has quit [Client Quit]
DonVitoC- has joined #ruby
Nahra_ has joined #ruby
asobrasil has joined #ruby
Brando753 has joined #ruby
fasta has joined #ruby
fasta has quit [Ping timeout: 264 seconds]
21WAA5PPA has joined #ruby
mnemon is now known as 36DAAXXWI
TheTFEF has quit [Changing host]
TheTFEF has joined #ruby
DestinyAwaits has joined #ruby
kobain has joined #ruby
DestinyAwaits has quit [Changing host]
kobain has quit [Changing host]
kobain has joined #ruby
DestinyAwaits has joined #ruby
prime has quit [Changing host]
prime has joined #ruby
bakingbread has joined #ruby
bakingbread has quit [Changing host]
Apocalypse has quit [Changing host]
Apocalypse has joined #ruby
MrThePlague has quit [Changing host]
MrThePlague has joined #ruby
arusso has joined #ruby
arusso has quit [Changing host]
wallerdev has joined #ruby
niceguyjames has joined #ruby
D4T has joined #ruby
soukihei_ has joined #ruby
eka has joined #ruby
jerius_ has joined #ruby
LaPetiteFromage has joined #ruby
andikr has quit [Remote host closed the connection]
JZTech101 has quit [Read error: Connection reset by peer]
emptyn1ne has joined #ruby
SeySayux_ has joined #ruby
realDAB has quit [*.net *.split]
NsOmNiAc has quit [*.net *.split]
geekbri has quit [*.net *.split]
mengu has quit [*.net *.split]
sn0wb1rdz_ has quit [*.net *.split]
emptynine has quit [*.net *.split]
nemesit|- has quit [*.net *.split]
cmarques has quit [*.net *.split]
senayar_ has quit [*.net *.split]
wsterling has quit [*.net *.split]
hkal has quit [*.net *.split]
v0n has quit [*.net *.split]
fumduq- has quit [*.net *.split]
Gate has quit [*.net *.split]
yo61_ has quit [*.net *.split]
pedda has quit [*.net *.split]
mikecmpbll has quit [*.net *.split]
jerius has quit [*.net *.split]
mark_locklear has quit [*.net *.split]
jonkri has quit [*.net *.split]
crankycoder has quit [*.net *.split]
Coolhand has quit [*.net *.split]
SeySayux has quit [*.net *.split]
thesheff17 has quit [*.net *.split]
nomadic_ has quit [*.net *.split]
alo1_ has quit [*.net *.split]
fivethreeo has quit [*.net *.split]
zeromodulus has quit [*.net *.split]
waxjar has quit [*.net *.split]
Adawerk has quit [*.net *.split]
moted has quit [*.net *.split]
Emmanuel_Chanel has quit [*.net *.split]
defrag has quit [*.net *.split]
DonVitoCorleone has quit [*.net *.split]
patsToms has quit [*.net *.split]
Tobarja has quit [*.net *.split]
mumblerit has quit [*.net *.split]
[narcan] has quit [*.net *.split]
Nahra has quit [*.net *.split]
ArnaudR has quit [*.net *.split]
BeLucid has quit [*.net *.split]
epta has quit [*.net *.split]
Niamkik has quit [*.net *.split]
matti has quit [*.net *.split]
Kovensky has quit [*.net *.split]
voodoofish has quit [*.net *.split]
mburns has quit [*.net *.split]
pietr0 has quit [*.net *.split]
grn has quit [*.net *.split]
joschi has quit [*.net *.split]
PaulePanter has quit [*.net *.split]
dv_ has quit [*.net *.split]
36DAAXXWI has quit [*.net *.split]
oddraisi1 has quit [*.net *.split]
twinkleHood has quit [*.net *.split]
Randomage has quit [*.net *.split]
mlue has quit [*.net *.split]
bobbyz has quit [*.net *.split]
sami_ has quit [*.net *.split]
yxhuvud has quit [*.net *.split]
Jb_ has quit [*.net *.split]
ebouchut has quit [*.net *.split]
companion has quit [*.net *.split]
monban has quit [*.net *.split]
tulip_ has quit [*.net *.split]
samu has quit [*.net *.split]
RubyPanther has quit [*.net *.split]
defrag1 has joined #ruby
patsToms_ is now known as patsToms
mark_locklear has joined #ruby
nomadic has joined #ruby
dnyy has quit [Ping timeout: 256 seconds]
waxjar has joined #ruby
tulip has joined #ruby
sn0wb1rdz has joined #ruby
octarine has quit [Ping timeout: 246 seconds]
tk_ has quit [Quit: ばいばい]
ziyadb has quit [Ping timeout: 246 seconds]
jztech101_ has quit [Ping timeout: 266 seconds]
JZTech101 has joined #ruby
darth_chatri has quit [Ping timeout: 248 seconds]
kapowaz has quit [Ping timeout: 241 seconds]
Bauer2 has joined #ruby
mlue has joined #ruby
SeySayux_ has quit [Excess Flood]
Tobarja has joined #ruby
brennanMKE has joined #ruby
phasma has quit [Ping timeout: 264 seconds]
bobbyz has joined #ruby
SeySayux has joined #ruby
ebouchut has joined #ruby
cmarques has joined #ruby
thesheff17 has joined #ruby
JohnBat26 has joined #ruby
zodiak has joined #ruby
asteve has joined #ruby
ArnaudR has joined #ruby
banister`gym has joined #ruby
Bauer1 has quit [Ping timeout: 247 seconds]
RubyPanther has joined #ruby
Emmanuel_Chanel has joined #ruby
samu has joined #ruby
v0n has joined #ruby
fridim_ has quit [Quit: Leaving]
kapowaz has joined #ruby
voodoofish has joined #ruby
sayan has quit [Ping timeout: 264 seconds]
jonkri has joined #ruby
krawchyk_ has joined #ruby
Sp4rKy has joined #ruby
bubblehead has quit [Ping timeout: 240 seconds]
romockee has quit [Quit: romockee]
saturnflyer has joined #ruby
hkal has joined #ruby
dnyy has joined #ruby
interactionjaxsn has joined #ruby
romockee has joined #ruby
21WAA5PPA has quit [*.net *.split]
Brando753 has quit [*.net *.split]
cburyta has joined #ruby
cofin has joined #ruby
bondar has joined #ruby
bondar has quit [Excess Flood]
krawchyk has quit [Ping timeout: 256 seconds]
ziyadb has joined #ruby
chuk has joined #ruby
bondar has joined #ruby
bondar has quit [Excess Flood]
interactionjaxsn has quit [Quit: play time]
burlyscudd1 has joined #ruby
LaPetiteFromage has quit [Quit: LaPetiteFromage]
tagrudev has quit [Remote host closed the connection]
burlyscudd has quit [Ping timeout: 240 seconds]
bondar has joined #ruby
bondar has quit [Excess Flood]
interactionjaxsn has joined #ruby
swills` is now known as swills
bondar has joined #ruby
bondar has quit [Excess Flood]
withnale has quit [Ping timeout: 248 seconds]
platzhirsch has quit [Quit: Leaving.]
banister`gym has quit [Remote host closed the connection]
platzhirsch has joined #ruby
platzhirsch has left #ruby [#ruby]
platzhirsch has joined #ruby
C0deMave- is now known as C0deMaver1ck
johnnyfuchs has joined #ruby
ned has joined #ruby
jefflyne_ has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
wallerdev has quit [Quit: wallerdev]
sarkis has quit [Quit: leaving]
platzhirsch has quit [Client Quit]
withnale has joined #ruby
<Bauer2>
apeiros: thanks! after testing auth using headers, it works!! question is how to make that authenticate_with_http_basic do |username, password| work with URL auth like user:pass@URL?
platzhirsch has joined #ruby
baordog has joined #ruby
lys has joined #ruby
pcarrier has joined #ruby
sarkis has joined #ruby
LaPetiteFromage has joined #ruby
zz_jinie has joined #ruby
colonolGron has joined #ruby
sarkis has quit [Client Quit]
pcarrier__ has quit [Remote host closed the connection]
phasma has joined #ruby
bradhe has joined #ruby
octarine has joined #ruby
nyuszika7h_ has left #ruby ["WeeChat 0.4.1"]
camilasan has quit [Remote host closed the connection]
mnemon has joined #ruby
wsterlin_ has quit [Remote host closed the connection]
burlyscudd1 has quit [Quit: Leaving.]
noop has quit [Ping timeout: 240 seconds]
lkba has joined #ruby
burlyscudd has joined #ruby
codesoda_ has quit [Read error: Connection reset by peer]
bradhe has quit [Ping timeout: 260 seconds]
codesoda has joined #ruby
freerobby1 has joined #ruby
zmike123 has joined #ruby
jastix has quit [Quit: Leaving]
freerobby has quit [Ping timeout: 264 seconds]
tommyvyo has quit [Quit:]
camilasan has joined #ruby
invsblduck_zzz is now known as invsblduck
julweber has joined #ruby
browndawg has joined #ruby
platzhirsch has left #ruby [#ruby]
hoelzro_ is now known as hoelzro
cmarques has quit [Ping timeout: 268 seconds]
relix_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Alveric has joined #ruby
awarner has quit [Read error: No route to host]
codesoda has quit [Remote host closed the connection]
endzyme has quit [Remote host closed the connection]
`p has quit [Quit: Leaving]
sarkis has joined #ruby
vigintas has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
redgirl_ has quit [Quit: This computer has gone to sleep]
acrussell has joined #ruby
<Veejay>
Hello everyone, is there a way to have Float#round return no decimal places if they're all 0s?
<Veejay>
i.e. I'm doing a .round(2) and it's returning 29.0, I'd rather it be 29 :)
vigintas has joined #ruby
awarner has quit [Read error: Connection reset by peer]
denver has quit [Ping timeout: 246 seconds]
awarner_ has joined #ruby
zarubin has quit [Ping timeout: 276 seconds]
Proshot has joined #ruby
WhereIsMySpoon has joined #ruby
allsystemsarego has joined #ruby
<MrZYX>
but for .42 you want 29.42?
Guga_ has joined #ruby
mary5030 has joined #ruby
<elaptics>
Veejay: then it would be an integer :) so do to_i
ffio has joined #ruby
<Veejay>
MrZYX: Exactly
<elaptics>
Veejay: there's no way to do it with any of ruby's methods afaik, you'd need to implement the logic you want
<_br_>
Something like this ? a = 20.0 ; a.to_i if( (a % 1) == 0.0 )
v0n has quit [Ping timeout: 268 seconds]
codecop has joined #ruby
<Veejay>
_br_: That would work indeed
<Veejay>
I was looking for something more "baked in" but thanks a lot
mary5030_ has joined #ruby
cmarques has joined #ruby
RyanHirsch has quit [Quit: Computer has gone to sleep.]
darth_chatri has joined #ruby
RORgasm has joined #ruby
Giorgio has quit [Ping timeout: 240 seconds]
WhereIsMySpoon has quit [Ping timeout: 240 seconds]
<_br_>
Ugly namespace pollutions. class Numeric; def weird_round; ( (self % 1) == 0.0 ) ? ( self.to_i ) : ( self ) ; end ; end ... You might want to use refinements here instead...
threesome has quit [Ping timeout: 246 seconds]
krawchyk has joined #ruby
citizensinspace has quit [Quit: citizensinspace]
kofno has quit [Remote host closed the connection]
<_br_>
damn anyone here using vim with multiselect and knows how to call another plugin function from MSExecNormalCmd ?
mary5030 has quit [Ping timeout: 245 seconds]
elux has joined #ruby
mary5030_ has quit [Remote host closed the connection]
Brando753 has joined #ruby
mary5030 has joined #ruby
burlyscudd1 has joined #ruby
Paradox has joined #ruby
citizensinspace has joined #ruby
mansi has quit [Remote host closed the connection]
burlyscudd has quit [Ping timeout: 268 seconds]
samu has quit [Changing host]
samu has joined #ruby
SeySayux has quit [Changing host]
SeySayux has joined #ruby
cschneid_ is now known as cschneid
mumblerit has joined #ruby
Xeago has joined #ruby
krawchyk_ has quit [Ping timeout: 240 seconds]
carloslopes has quit [Remote host closed the connection]
tommyvyo has joined #ruby
C0deMaver1ck is now known as Guest30158
Hien is now known as Guest27407
dhruvasagar is now known as Guest70526
mnemon is now known as Guest14274
joast is now known as Guest1988
ned is now known as Guest66032
kennym is now known as Guest83029
machuga is now known as Guest41763
Nigel_ is now known as Guest37357
ferdev has quit [Read error: Connection reset by peer]
mumblerit is now known as Guest80508
pedda has joined #ruby
jztech101_ has joined #ruby
vlad_starkov has joined #ruby
ferdev has joined #ruby
poikon has joined #ruby
d2dchat has joined #ruby
ffio is now known as Guest47909
jztech101__ has joined #ruby
gnerol_ has joined #ruby
yashshah has quit [Read error: Connection reset by peer]
PaulePan1er is now known as PaulePanter
companion_ is now known as companion
companion has quit [Changing host]
companion has joined #ruby
yashshah has joined #ruby
cantonic_ has joined #ruby
kpshek has joined #ruby
msuszczy has quit [Ping timeout: 276 seconds]
lectrick has joined #ruby
lectrick has quit [Changing host]
lectrick has joined #ruby
msuszczy has joined #ruby
shadoi has joined #ruby
io_syl has quit [Quit: io_syl]
JZTech101 has quit [Ping timeout: 251 seconds]
Akuma has joined #ruby
jztech101__ has quit [Client Quit]
enebo has joined #ruby
cantonic has quit [Ping timeout: 264 seconds]
cantonic_ is now known as cantonic
JZTech101 has joined #ruby
shaunbaker has quit [Remote host closed the connection]
lectrick_ has joined #ruby
nbouscal has joined #ruby
v0n has joined #ruby
DestinyAwaits1 has joined #ruby
Uranio has joined #ruby
lectrick has quit [Client Quit]
cha1tanya has joined #ruby
Guest41763 is now known as machuga
vlad_starkov has quit [Ping timeout: 264 seconds]
lectrick_ has quit [Changing host]
lectrick_ has joined #ruby
jztech101_ has quit [Ping timeout: 276 seconds]
banister`gym has joined #ruby
shadoi1 has quit [Ping timeout: 245 seconds]
lectrick_ is now known as lectrick
_seanc_ has joined #ruby
<lectrick>
So if I am just a train ride from Manhattan and was considering renting out my (nice) house as sort of a Ruby/Rails incubator-type space, or just hosting devs for networking reasons... Would that be unusual?
saturnflyer has left #ruby [#ruby]
<sarkis>
very
<sarkis>
j/k :)
Guest14274 is now known as mnemon
mnemon has quit [Changing host]
mnemon has joined #ruby
vlad_starkov has joined #ruby
DestinyAwaits has quit [Ping timeout: 240 seconds]
bondar has joined #ruby
bondar has quit [Excess Flood]
bondar has joined #ruby
bondar has quit [Client Quit]
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
Guest80508 is now known as mumblerit
sambao21 has joined #ruby
binaryplease has quit [Ping timeout: 240 seconds]
vlad_sta_ has joined #ruby
rhys has joined #ruby
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
zcreative has joined #ruby
burlyscudd1 has quit [Quit: Leaving.]
jmimi has quit [Quit: Leaving.]
vlad_st__ has joined #ruby
pyrac has quit [Quit: pyrac]
DestinyAwaits1 has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Ping timeout: 245 seconds]
makoun has joined #ruby
Guest30158 has quit [Changing host]
C0deMaver1ck has joined #ruby
ananthakumaran has joined #ruby
bigoldrock has joined #ruby
geggam has joined #ruby
mickeyd has joined #ruby
Guest30158 is now known as C0deMaver1ck
Targen has quit [Remote host closed the connection]
ebouchut has quit [Read error: Connection reset by peer]
monkegjinni has quit [Remote host closed the connection]
BlakeRG has quit [Remote host closed the connection]
MrBoolean has quit [Ping timeout: 264 seconds]
<Eiam>
If i want to group an array by attributes of objects in the array so long as those values also exist in a seperate array… nothing fancy in group_by for that right, I just need to write that logic into my group_by block?
_seanc_ has quit [Quit: _seanc_]
apeiros has joined #ruby
julweber has quit [Remote host closed the connection]
gustavn has joined #ruby
<MrZYX>
so you want to arrays back, one that has the objects whose attributes are contained in that separate array and one that has all the others?
<MrZYX>
*two
r0bgleeson has joined #ruby
gustavn has quit [Client Quit]
mikecmpbll has joined #ruby
poseid_ has joined #ruby
gustavn has joined #ruby
<Eiam>
hmm no, for all others I think I'd rather group them by "TBD"
krawchyk_ has joined #ruby
<Eiam>
this is all doable inside a group_by correct? just check if the object attribute exists inside the other array & return that, if not return "TBD" and I'm set
gustavn has quit [Client Quit]
airlok has quit [Remote host closed the connection]
citizensinspace has joined #ruby
<Eiam>
for some reason it feels like there would be a fancy built in way to do something kind of like that, a weird intersection group_by, eh I dunno. I'll just write the boring block =)
<MrZYX>
hm, yeah
gustavn has joined #ruby
krawchyk has quit [Ping timeout: 240 seconds]
BlakeRG has joined #ruby
<MrZYX>
post it if you're done, maybe someone knows a smarter way anyway :P
<Eiam>
MrZYX: yeah, no worries was just kind of rubberducking the channel
jorge___ has joined #ruby
Voodoofish430 has joined #ruby
<Eiam>
MrZYX: sure, will do
BlakeRG has quit [Remote host closed the connection]
adeponte has joined #ruby
mengu_ has quit [Ping timeout: 276 seconds]
poseid_ has quit [Client Quit]
mikecmpbll has quit [Client Quit]
jorge___ has quit [Remote host closed the connection]
<Eiam>
I actually do have a rubber duck sitting on top of my monitor, but I've found I tend to parse better with the problem written vs verbalized, sometimes
noname001 has quit [Ping timeout: 248 seconds]
<pontiki>
oh crikey
<pontiki>
now i know what you mean
<Zelest>
lol
<pontiki>
i forgot that
johchri has joined #ruby
viszu has joined #ruby
timonv has quit [Remote host closed the connection]
xardas has joined #ruby
Xeago has quit [Remote host closed the connection]
johchri has quit [Client Quit]
Columcil1e is now known as Columcille
jorge___ has quit [Ping timeout: 245 seconds]
mmitchell has quit [Ping timeout: 256 seconds]
mikecmpbll has quit [Client Quit]
moura has quit [Quit: Computer has gone to sleep.]
Ziarkaen has joined #ruby
goodgame has quit [Quit: Quitte]
<kpwz>
what's the story with File paths inside gems?
<kpwz>
are things like relative paths relative to the structure of the gem when the gem is a module you then include in another class?
Guga_ has quit [Remote host closed the connection]
<apeiros>
kpwz: relative paths are always relative to the working directory
tylersmith has quit [Remote host closed the connection]
<apeiros>
except for require/load
Guga_ has joined #ruby
Giorgio has quit [Quit: Ex-Chat]
<apeiros>
those paths are relative to any of the dirs mentioned in $LOAD_PATH
Giorgio has joined #ruby
<apeiros>
by requiring a file from a gem, that gem's lib dir will be added to $LOAD_PATH.
wolcanus has joined #ruby
* Hanmac1
still prefers require_relative
* apeiros
still thinks require_relative is for people who don't understand $LOAD_PATH :-p
dhruvasagar has joined #ruby
<kpwz>
apeiros: this isn't so much for the purposes of require so much as direct filepath stuff
poseid has quit [Quit: Leaving.]
<kpwz>
I want to be able to load a YAML config file at a known location
morgz has joined #ruby
<Hanmac1>
apeiros: you mean the same people that does not understand the difference between include "" and include <> ?
<apeiros>
kpwz: as said, all except require/load are relative to working directory
tkuchiki has joined #ruby
<apeiros>
totally unrelated to gems and other ruby stuff
morgz has quit [Remote host closed the connection]
pietr0_ is now known as pietr0
druonysus has joined #ruby
poga has quit [Remote host closed the connection]
danshultz has joined #ruby
amh345 has joined #ruby
anay has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
eriktrautman has joined #ruby
Akuma has quit [Ping timeout: 240 seconds]
<_br_>
If you had a module::class taking care of some payment api and now you have another bit which is generating html forms for that payment api, would you create the html generator bit as a Module::Module mixin (instance methods to be included in the main Module::Class) or what would you choose?
nbouscal has quit [Quit: Computer has commenced electric sheep tracking protocol.]
<MrZYX>
those are separate classes
reset has joined #ruby
Kar- has quit [Remote host closed the connection]
jrendell has joined #ruby
<_br_>
You would turn the html outputting into its own module::class? I see.
<MrZYX>
yes
poikon has quit [Remote host closed the connection]
rupee has joined #ruby
airlok has quit [Remote host closed the connection]
<rgreen_>
hey guys i am try to do array.map!{....} but array may have an element that is not able to be mapped and i need to just skip over it and continue onto the next ne. I was think ing i need to do womsthing with try, catch but im not sure
bionoid has quit [Remote host closed the connection]
jztech101_ has joined #ruby
<pontiki>
hmm
<pontiki>
do you mean begin-resuce?
pmros has quit [Quit: Konversation terminated!]
<pontiki>
there's throw-catch, but that's a longjump thing
<rgreen_>
should i do it in a loop like array[i].map?
voglster has quit [Ping timeout: 256 seconds]
adeponte has quit [Read error: Connection reset by peer]
jztech101_ has quit [Read error: Connection reset by peer]
<pontiki>
probably not, unless the element at array[i] enumerable
adeponte has joined #ruby
<pontiki>
what sort array contains an element that can't be part of an enumeration?
jesly has quit [Read error: Connection reset by peer]
<rgreen_>
idk
mahmoudimus has joined #ruby
Akuma has joined #ruby
adeponte has quit [Read error: Connection reset by peer]
<pontiki>
you've got one tho?
twoism has joined #ruby
headius has joined #ruby
adeponte has joined #ruby
hukl has joined #ruby
citizensinspace has quit [Ping timeout: 240 seconds]
iamjbecker has joined #ruby
<rgreen_>
i have my array.map!{|s| s.sub(some text) {block replace}}
nomenkun has quit [Remote host closed the connection]
<rgreen_>
and not every eelemt in the array has some text
<rgreen_>
so it cant map
brtdv has quit [Read error: Operation timed out]
<ccooke>
rgreen_: you can just handle that in the map block
<pontiki>
sub without ! will simply return the current conten
<Hanmac1>
rgeen_ use nil and then compact
<pontiki>
unlike sub!
cmhobbs has quit [Ping timeout: 240 seconds]
jerius_ has quit [Ping timeout: 268 seconds]
<ccooke>
rgreen_: what do you want to happen if there's an element of the array that isn't text?
<rgreen_>
ccooke: i can put a begin rescue in the map block?
jesly has joined #ruby
blitz has joined #ruby
<pontiki>
you can put them anywhere
<rgreen_>
they are all text but one of them does contain what im looking for
heftig has joined #ruby
<ccooke>
rgreen_: you could, but that may or may not be what you want. you need to decide that you want to do with non-text items in the array
<rgreen_>
or rather some of them dont
<pontiki>
rgreen_: what do you get if you remove the ! from the map?
ffio has joined #ruby
<ccooke>
rgreen_: do you just want to do the substitution on any elements that have it?
<rgreen_>
yea
iamjbecker has quit [Remote host closed the connection]
<ccooke>
rgreen_: and you want to alter the items in the array?
<rgreen_>
yes
Guest47909 has quit [Ping timeout: 276 seconds]
cmhobbs has joined #ruby
matti_ has quit [Quit: Reconnecting]
matti has joined #ruby
<ccooke>
rgreen_: in that case, you don't need a map at all. Use an each. Inside the block, test to see if they'll support the sub! method, then call it.
<rgreen_>
ok brb
<ccooke>
rgreen_: something like array.each { |i| next unless i.respond_to? :sub! ; i.sub!(text) {block} }
<ccooke>
(there are cleaner ways to write it, even)
LaPetiteFromage has quit [Quit: LaPetiteFromage]
<jesly>
any rails-angular gurus here? :-D
<Hanmac1>
jesly: #rubyonrails
kpshek has quit []
<jesly>
hanmac: thnx buddy :)
<Hanmac1>
jesly: we are all rails-agnostics, we do not believe in the existence of rails
cha1tanya has quit [Quit: cha1tanya]
timonv has quit [Remote host closed the connection]
<jesly>
hanmac1: so am i, ;) (i don't know rails either, but am fine in ruby)
<jesly>
i needed the help for a friend of mine.
Giorgio has quit [Ping timeout: 245 seconds]
wolcanus has quit [Remote host closed the connection]
<pontiki>
ccooke: i don't think that's quite going to do what rgreen_ needs
<jesly>
his question has been rotting in stackoverflow w/o an answer for some days..
<pontiki>
sub! may still return nil
<ccooke>
pontiki: but they said they just needed to replace the items in the array
freerobby has joined #ruby
<ccooke>
pontiki: and it doesn't matter what an each returns
jorge__ has joined #ruby
Karpuragauram has joined #ruby
<pontiki>
no, the each .. respond_to? is good
jesly has quit [Read error: Connection reset by peer]
<pontiki>
i think they need to use sub instead of sub! there
<ccooke>
If rgreen_ actually needs to return the altered block, then array.map { |i| if i.respond_to? :sub; i.sub(text) {block}; else i; end }
mmitchell has quit [Remote host closed the connection]
<ccooke>
pontiki: that wouldn't do anything
<pontiki>
or else use sub!, and catch it if it returns nil and return s at that point?
Vivekananda has quit [Ping timeout: 240 seconds]
<pontiki>
hmm
<ccooke>
pontiki: the point is that sub(){} will change the text if it's there, and not otherwise. sub! will alter the original object, sub will return the changed one
jesly has joined #ruby
poikon has quit [Remote host closed the connection]
<pontiki>
yes, but sub! will also return nil if it can't change the original
<ccooke>
in the each, sub() will do nothing, because each will return the original array.
<pontiki>
won't it?
<ccooke>
the return of sub! doesn't matter, though. it's being thrown away
<pontiki>
then how does array get changed?
<apeiros>
it doesn't
<apeiros>
the values in the array get changed
<rgreen_>
ok i am getting an error, here is the actual implemented line
<pontiki>
i thought that's what he wanted?
<rgreen_>
orig_introtext_strings.each{|i| next unless i.respond_to? :sub! ; i.sub!(/index.php\?option=com_attachments&task=download_unsecure&attachmentid=(\d+)/) {replacement_url.url[replacement_url.id.index(Integer($1))]}}
jesly has quit [Read error: Connection reset by peer]
<apeiros>
the array itself stays identical with .each
rdark has quit [Quit: leaving]
<pontiki>
apeiros: you are far too precise
<pontiki>
i meant the contents of array
<amh>
did free node take a dump earlier?
<rgreen_>
the problem is that Integer($1) is no longer returning a valid id
<krawchyk_>
amh: haha yes
<amh>
well that explains it!
jorge__ has quit [Ping timeout: 276 seconds]
<apeiros>
you can't be too precise in programming. being imprecise is precisely the source of "why the fuck won't it work?!?"
burlyscudd has left #ruby [#ruby]
<ccooke>
pontiki: unfortunately precision is important here :-)
adeponte has quit [Read error: Connection reset by peer]
<apeiros>
and it applies quite a bit for this very situation
adeponte has joined #ruby
Guedes0 has left #ruby ["Saindo"]
burlyscudd has joined #ruby
<pontiki>
people often get hugely frustrated by my level of precision
poikon has joined #ruby
<pontiki>
and here i am feeling their pain
JZTech101 has joined #ruby
<ccooke>
Precision is why I asked what rgreen_ actually needed to do - it wasn't possible to help without knowing, and the code didn't make it clear enough
<rgreen_>
sorry
jbpros has joined #ruby
<ccooke>
(no criticism of rgreen_ here: Being imprecise is really easy when coding, because what you need is all in your head)
realDAB has quit [Quit: realDAB]
<pontiki>
so then, if you use the each, and sub!, and sub! returns a nil, how is it that that particular array element is not going to be set to nil?
DestinyAwaits has quit [Quit: Leaving]
jbpros has quit [Client Quit]
<ccooke>
pontiki: because sub!'s return has nothing to do with what it does
<pontiki>
no?
woolite64 has joined #ruby
<ccooke>
pontiki: sub! operates directly on the object you call it from, changing it (if need be)
<pontiki>
it's setting the value of s at the point
<pontiki>
which is pointing to the current element in the array
airlok has joined #ruby
<pontiki>
so it will be setting the value of the current element of the array
<ccooke>
pontiki: no, that's not quite precise enough (sorry!)
<pontiki>
no?
<pontiki>
i must go test this
<ccooke>
sub! is a method *of* s, which is an object that happens to be one of the items in the array
<ccooke>
when you call s.sub!, you're calling the sub! method on a String object (probably. Or anything else that has a sub! method)
<ccooke>
that method, because it's a part of the object, can change the value of the object itself. It can then return anything it likes.
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
ffio has quit [Quit: WeeChat 0.4.1]
<spike|spiegel>
I'm sub! I'll return poop all the time, coz, I can.
mansi has quit [Read error: Connection reset by peer]
jibi has quit [Ping timeout: 240 seconds]
ffio has joined #ruby
<ccooke>
pontiki: for an example, run this code: String.class_exec { def foo! ;self.replace('foo'); "bar"; end }
<ccooke>
pontiki: then define a string variable and call the foo! method on it - see what the method returns, and then see what the value of the string is.
devoldmx has quit [Ping timeout: 268 seconds]
<rgreen_>
i havnt been watchin all of your conversation, but im confused , |i| next unless i.respond_to? :sub! ; i.sub!(...) if all of the elements in the array are strings, wont they all respond to sub!? however some of them are the problem strings that dont behave with what sub tries to do
zets has joined #ruby
<ccooke>
rgreen_: ah, in that case you can drop the next unless... line.
JZTech101 has quit [Ping timeout: 264 seconds]
<ccooke>
rgreen_: when you said that not everything worked, I thought that you meant not everything in the array is a string
brendan- is now known as bmurt
robert_ has quit [Read error: Connection reset by peer]
<rgreen_>
ahh sorry yea here is what im actually doing
<rgreen_>
orig_introtext_strings.each{|i| next unless i.respond_to? :sub! ; i.sub!(/index.php\?option=com_attachments&task=download_unsecure&attachmentid=(\d+)/) {replacement_url.url[replacement_url.id.index(Integer($1))]}}
robert_ has joined #ruby
<rgreen_>
but orig_introtext_strings are all strings
<ccooke>
rgreen_: yeah, you can just have the i.sub! statement in the block in that case
<rgreen_>
but some of them contain the sub! regex and some dont
devoldmx has joined #ruby
mmitchell has joined #ruby
<rgreen_>
so if sub! fails, will it move to the next one or will it throw an error?
<ccooke>
rgreen_: right. that'll work fine in the each then
mmitchell has quit [Remote host closed the connection]
jbpros has joined #ruby
realDAB has joined #ruby
airlok has quit [Ping timeout: 240 seconds]
mmitchell has joined #ruby
<rgreen_>
its still throwing an error :56:in `[]': no implicit conversion from nil to integer (TypeError) from sql_code.rb:56:in `block (2 levels) in <main>' from sql_code.rb:56:in `sub!' from sql_code.rb:56:in `block in <main>' from sql_code.rb:56:in `each' from sql_code.rb:56:in `<main>'
<rgreen_>
which is the Integer($1) part
forrest has joined #ruby
thepumpkin has quit [Remote host closed the connection]
<rgreen_>
but that is the same problem that i was having before
<apeiros>
x.sub! # sub! *can't* set x, it can only modify the object x refers to
<pontiki>
i understand: what s.sub! *returns* doesn't matter, as you said
<pontiki>
only what it does
<apeiros>
and since objects can't *become* another object, i.e. a String can't *become* nil, x can never become nil by `x.sub!`
kevinykchan has joined #ruby
bionoid has joined #ruby
<apeiros>
in the same way, ary.each { |x| x.sub!(…) }, sub can't change the array, because it doesn't know about it. neither does x.
r0bby has quit [Ping timeout: 256 seconds]
jbpros has quit [Client Quit]
cofin has joined #ruby
Mars^ has quit [Ping timeout: 268 seconds]
jhonnyboy has left #ruby [#ruby]
adeponte has quit [Read error: Connection reset by peer]
jmimi has quit [Quit: Leaving.]
jmimi has joined #ruby
adeponte has joined #ruby
dallasm_ has joined #ruby
Es0teric has quit [Read error: No buffer space available]
RORgasm has quit [Read error: Connection reset by peer]
zodiak has quit [Ping timeout: 240 seconds]
RORgasm has joined #ruby
baordog_ has joined #ruby
Es0teric has joined #ruby
atyz has quit [Quit: Leaving...]
<rgreen_>
can i put a if statement in a block for sub i.e. sub!(...) {if statement}
<apeiros>
rgreen_: yes
<apeiros>
blocks are ordinary ruby code
lindenle has joined #ruby
<apeiros>
you can put in whatever you want. sub! only cares about the block's return value.
zodiak has joined #ruby
<apeiros>
you could even define classes in your sub's block
interactionjaxsn has quit [Remote host closed the connection]
<Hanmac1>
i still wonder why Integer($1) fails
lindenle has quit [Remote host closed the connection]
monkegjinni has joined #ruby
anay has joined #ruby
interactionjaxsn has joined #ruby
baordog has quit [Ping timeout: 276 seconds]
<rgreen_>
i dont know what is actually in $1
lindenle has joined #ruby
<realDAB>
hanmac1: i missed that one. can you summarize or point me to a gist or something?
<rgreen_>
i wish i could see what it is getting set to
Karpuragauram has quit [Quit: Ex-Chat]
germanstudent has quit [Ping timeout: 246 seconds]
Vivekananda has joined #ruby
Zai00 has quit [Quit: Zai00]
robscomputer_ has joined #ruby
robscomputer has quit [Read error: Connection reset by peer]
khushildep has quit [Ping timeout: 248 seconds]
gildo_ has joined #ruby
kenneth has quit [Quit: kenneth]
<Hanmac1>
realDAB: from what i see the $1 should be (\d+) so it should be a number hm
tatsuya_o has quit [Remote host closed the connection]
Guest83029 is now known as kennym
<ccooke>
It'll be a string, though
rezzack has joined #ruby
<ccooke>
but it's easy to see what it does
interactionjaxsn has quit [Ping timeout: 240 seconds]
maxmanders has joined #ruby
jprovazn has quit [Quit: Odcházím]
dallasm_ has quit [Remote host closed the connection]
germanstudent has joined #ruby
jesly has quit [Read error: Connection reset by peer]
77CAAKLE3 is now known as [Fudge]
kenneth has joined #ruby
ciziar has joined #ruby
wolcanus has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
kindjal has joined #ruby
samuel02_ has quit [Ping timeout: 240 seconds]
atyz has joined #ruby
reset has quit [Quit: Leaving...]
xsdg_ has quit [Quit: Reconnecting]
xsdg has joined #ruby
adeponte has quit [Read error: Connection reset by peer]
JZTech101 has joined #ruby
<pontiki>
rgreen_: see #tap
ciziar has quit [Client Quit]
adeponte has joined #ruby
<ccooke>
pontiki: that won't quite do the job in this case
<ccooke>
you need to see the values as generated.
ciziar has joined #ruby
realDAB has quit [Quit: realDAB]
<ccooke>
the simplest one is to define a new method that calls Integer(), and replace the call to Integer() with that.
dallasm_ has joined #ruby
jesly has joined #ruby
ciziar has quit [Client Quit]
dallasm__ has joined #ruby
<ccooke>
Or, if you're sick and don't want to edit your code, you *could* do: Kernel.class_exec { alias_method :Integer_copy, :Integer; def Integer(i); puts "Integer(#{i.inspect})"; Integer_copy(i); end }
jesly has quit [Read error: Connection reset by peer]
<ccooke>
(or something like it)
danslo has quit [Quit: danslo]
mengu has joined #ruby
robscomputer_ has quit [Read error: Connection reset by peer]
tjbiddle has joined #ruby
dallasm_ has quit [Remote host closed the connection]
robscomputer has joined #ruby
jmimi has quit [Quit: Leaving.]
jmimi1 has joined #ruby
marcgg has quit [Read error: No route to host]
<rgreen_>
thanks for your help guys, im finally making progress
marcgg_ has joined #ruby
adeponte has quit [Remote host closed the connection]
jesly has joined #ruby
predator117 has quit [Ping timeout: 268 seconds]
ntus1017 has joined #ruby
interactionjaxsn has joined #ruby
<pontiki>
i was thinking actually of tapping the sub and seeing what $1 was set to
wolcanus has quit [Ping timeout: 276 seconds]
mengu has quit [Ping timeout: 248 seconds]
jmimi1 has quit [Client Quit]
<ccooke>
pontiki: you can't do that, though. The sub isn't an iterator
jmimi has joined #ruby
<ccooke>
more to the point, the tap will only get at what the sub returns
burlyscudd has quit [Quit: Leaving.]
<ccooke>
which will be after $1 goes out of scope
citizensinspace has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
<pontiki>
does $1 go out of scope after the block?
<Hanmac1>
maybe, thats one of the reasons why i do not trust $1
<pontiki>
to the bat irb!
danslo has joined #ruby
g0bl1n has quit [Quit: Ex-Chat]
Notte has quit [Remote host closed the connection]
tjbiddle has joined #ruby
<rgreen_>
i ended up doing a very simple function call def show(args) replacement_url=Build_replacement_links.new() puts args puts replacement_url.id.include? args end
ferdev has quit [Quit: ferdev]
lara-the-bell has joined #ruby
reset has joined #ruby
fernandoaleman has joined #ruby
JZTech101 has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC]
fernandoaleman has left #ruby [#ruby]
mansi has quit [Remote host closed the connection]
dodosan has quit [Remote host closed the connection]
xardas_ has joined #ruby
ffranz has joined #ruby
<pontiki>
rgreen_: did that show you what you needed?
jesly has joined #ruby
kirun has joined #ruby
kasper has quit [Remote host closed the connection]
ananthakumaran has quit [Quit: Leaving.]
xardas has quit [Ping timeout: 240 seconds]
xardas_ is now known as xardas
adeponte has quit [Remote host closed the connection]
<rgreen_>
yea it worked well
hamed_r has joined #ruby
<pontiki>
do take a look at #tap, it's really useful for debuggin
<rgreen_>
yea i will thanks
DrPete has joined #ruby
<Hanmac1>
tap &:display is the best
havenwood has quit [Remote host closed the connection]
nemesit|znc has quit [Ping timeout: 264 seconds]
JZTech101 has joined #ruby
jesly has quit [Read error: Connection reset by peer]
echevemaster has joined #ruby
jesly has joined #ruby
lele has quit [Ping timeout: 260 seconds]
krawchyk_ has quit [Remote host closed the connection]
krawchyk has joined #ruby
paolooo has quit [Quit: Page closed]
cofin has quit [Quit: cofin]
JZTech101 has quit [Read error: Connection reset by peer]
jesly has quit [Read error: Connection reset by peer]
JZTech101 has joined #ruby
nomenkun has quit [Remote host closed the connection]
<darth_chatri>
anyone used rspec/given?
dallasm__ has quit [Remote host closed the connection]
<darth_chatri>
i'm having a problem where a Given block is executed multiple times
jesly has joined #ruby
monkegjinni has quit [Remote host closed the connection]
nemesit|znc has joined #ruby
dallasm_ has joined #ruby
bionoid has quit [Remote host closed the connection]
nomenkun has joined #ruby
predator117 has joined #ruby
bionoid has joined #ruby
bionoid has quit [Remote host closed the connection]
<rgreen_>
lets say im doin array.each{|i| puts "text=#{other_array[i.index]}"} i know this syntax is wrong but what can i call instead of index to retrieve the index of i as it goes through the array?
havenwood has joined #ruby
<tobiasvl>
each_with_index
jesly has quit [Read error: Connection reset by peer]
<tobiasvl>
is what you want
<tobiasvl>
instead of each
<rgreen_>
ok thanks
kindjal has quit [Quit: Computer has gone to sleep.]
nemesit|znc has quit [Ping timeout: 260 seconds]
jesly has joined #ruby
<pontiki>
darth_chatri: Given being gherkin in a cucumber feature?
philipe1 has joined #ruby
fphilipe has joined #ruby
<pontiki>
you're having trouble with the step definition?
kindjal has joined #ruby
cburyta has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 240 seconds]
<pontiki>
darth_chatri: is your feature suite on public repo? (github, etc)
kasper has joined #ruby
jesly has quit [Read error: Connection reset by peer]
LaPetiteFromage has joined #ruby
pskosinski has quit [Remote host closed the connection]
cofin has joined #ruby
adeponte has joined #ruby
jesly has joined #ruby
reset has joined #ruby
<darth_chatri>
pontiki: not yet, i'll pastebin it
nemesit|znc has joined #ruby
adeponte has quit [Remote host closed the connection]
bradhe has joined #ruby
<citizensinspace>
Could someone who knows ruby well take a look at this gist and tell me what they think about it quality-wise? I'm curious how it stacks up. https://gist.github.com/citizens/5962814
<pontiki>
i guess that leaves me out
Skelz0r has quit [Quit: Lost terminal]
<citizensinspace>
hah, or anyone I guess.
JZTech101 has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC]
<pontiki>
darth_chatri: i think you misunderstand what "lazy" means
<pontiki>
in that sense, "lazy" means only execute if i need the value
<Morrolan>
citizensinspace: You could replace the three lines in the 'attributes' function with a single-line inject. If you have a few thousand attributes then the performance hit from creating a new hash for each might be noticeable, though.
<darth_chatri>
its also cached
<pontiki>
but if you need the value in multiple tests, it will run that many times
lethan has quit [Remote host closed the connection]
rgreen_ has quit [Ping timeout: 250 seconds]
<citizensinspace>
thanks havenwood, hanmac1. I appreciate it.
<darth_chatri>
"The first reference to 'stack' in the specification will cause the code block to execute. Futher references to 'stack' will reuse the previously generated value."
jesly has quit [Read error: Connection reset by peer]
<pontiki>
eh
<pontiki>
i don't know this gem
dodosan has joined #ruby
<darth_chatri>
wrt the github README example
<pontiki>
forget whatever i said
<pontiki>
i've never used it
devoldmx has quit [Ping timeout: 240 seconds]
anonymuse has quit [Ping timeout: 245 seconds]
tatsuya_o has joined #ruby
anonymuse has joined #ruby
lkba has joined #ruby
DrShoggoth has quit [Quit: Leaving]
morgz has joined #ruby
morgz has quit [Client Quit]
morgz_ has joined #ruby
kindjal has quit [Quit: Computer has gone to sleep.]
morgz_ has quit [Client Quit]
morgz has joined #ruby
JohnBat26 has joined #ruby
jesly has joined #ruby
jesly has quit [Read error: Connection reset by peer]
takezawa has quit [Remote host closed the connection]
milardovich has joined #ruby
takezawa has joined #ruby
milardovich has quit [Max SendQ exceeded]
Gue______ has joined #ruby
milardovich has joined #ruby
jesly has joined #ruby
danslo has quit [Quit: danslo]
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
milardovich has quit [Max SendQ exceeded]
milardovich has joined #ruby
Gooder`` has quit [Read error: Connection reset by peer]
kindjal has joined #ruby
dallasm_ has quit [Remote host closed the connection]
jesly has quit [Read error: Connection reset by peer]
viszu has quit [Quit: Leaving.]
voglster has quit [Ping timeout: 240 seconds]
Astralum has joined #ruby
atmosx has quit [Remote host closed the connection]
milardovich has quit [Max SendQ exceeded]
cburyta has joined #ruby
milardovich has joined #ruby
takezawa has quit [Ping timeout: 264 seconds]
jesly has joined #ruby
milardovich has quit [Max SendQ exceeded]
milardovich has joined #ruby
bradhe has quit [Ping timeout: 260 seconds]
zmike123 has quit [Quit: ~]
voglster has joined #ruby
burlyscudd has quit [Quit: Leaving.]
jbpros has joined #ruby
milardovich has quit [Max SendQ exceeded]
devoldmx has joined #ruby
milardovich has joined #ruby
Hanmac1 has quit [Quit: Leaving.]
milardovich has quit [Max SendQ exceeded]
milardovich has joined #ruby
Appineer has joined #ruby
whowantstolivefo has joined #ruby
Appineer has left #ruby [#ruby]
milardovich has quit [Max SendQ exceeded]
milardovich has joined #ruby
<darth_chatri>
pontiki: you were right. the cached values are used only across sibling contexts
popl has joined #ruby
<darth_chatri>
so it was acting like a let
JZTech101 has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC]
fphilipe has quit [Ping timeout: 240 seconds]
danshultz has quit [Ping timeout: 260 seconds]
milardovich has quit [Max SendQ exceeded]
philipe1 has quit [Ping timeout: 245 seconds]
c0rn has quit [Quit: Computer has gone to sleep.]
milardovich has joined #ruby
morgz has quit [Quit: Leaving]
jesly has quit [Read error: Connection reset by peer]
danshultz has joined #ruby
havenwood has quit [Remote host closed the connection]
robscomputer_ has joined #ruby
robscomputer has quit [Ping timeout: 268 seconds]
milardovich has quit [Max SendQ exceeded]
milardovich has joined #ruby
madb055 has joined #ruby
jesly has joined #ruby
LaPetiteFromage has quit [Quit: LaPetiteFromage]
morgz has joined #ruby
milardovich has quit [Max SendQ exceeded]
CaptainJet has joined #ruby
milardovich has joined #ruby
milardovich has quit [Max SendQ exceeded]
jesly has quit [Read error: Connection reset by peer]
terrellt has joined #ruby
milardovich has joined #ruby
danshultz has quit [Ping timeout: 245 seconds]
browndawg has quit [Quit: Leaving.]
milardovich has quit [Max SendQ exceeded]
danbeck has joined #ruby
jesly has joined #ruby
julweber has quit [Remote host closed the connection]
danshultz has joined #ruby
milardovich has joined #ruby
milardovich has quit [Max SendQ exceeded]
workmad3 has joined #ruby
milardovich has joined #ruby
bradhe has joined #ruby
milardovich has quit [Max SendQ exceeded]
Speed has joined #ruby
milardovich has joined #ruby
TheNotary has quit [Ping timeout: 240 seconds]
rgreen has joined #ruby
milardovich has quit [Max SendQ exceeded]
<rgreen>
does anyone here have any experience with the mysql2 gem?
jesly has quit [Read error: Connection reset by peer]
jmimi has joined #ruby
Zai00 has joined #ruby
sethetter has joined #ruby
mlr has joined #ruby
colonolGron has quit [Quit: leaving]
Zai00 has quit [Client Quit]
tatsuya_o has quit [Remote host closed the connection]
colonolGron has joined #ruby
bionoid has quit [Remote host closed the connection]
<sethetter>
I'm trying to generate a 48 char alphanumeric encrypted string from another string and a salt. Is this possible and if so what module(s) should I be looking into?
terrellt is now known as bla
bla is now known as terrellt
jesly has joined #ruby
eldariof has quit [Ping timeout: 260 seconds]
deception has joined #ruby
banjara has quit [Quit: Leaving.]
JMcAfreak is now known as Guest96751
reset is now known as Guest78320
kennym is now known as Guest84800
c0rn has joined #ruby
Guga_ is now known as Guest93412
popl is now known as Guest76110
heftig is now known as Guest55410
robert_ is now known as Guest82982
Columcille is now known as Guest46949
ffio is now known as Guest33963
Speed is now known as Guest72609
Matip has quit [Quit: Leaving]
matematikaadit has joined #ruby
awarner has joined #ruby
cofin has quit [Quit: cofin]
Tobarja has quit [Ping timeout: 241 seconds]
jmimi has left #ruby [#ruby]
razi has quit [Quit: Leaving.]
jesly has quit [Read error: Connection reset by peer]
burlyscudd has quit [Changing host]
burlyscudd has joined #ruby
rezzack has quit [Changing host]
rezzack has joined #ruby
deception has quit [Client Quit]
momomomomo has joined #ruby
jmimi has joined #ruby
deception has joined #ruby
madb055 has quit [Remote host closed the connection]
Guest76110 has quit [Changing host]
Guest76110 has joined #ruby
madb055 has joined #ruby
awarner_ has quit [Ping timeout: 264 seconds]
Hanmac1 has joined #ruby
deception has quit [Changing host]
deception has joined #ruby
TheNotary has joined #ruby
tonini has joined #ruby
io_syl has joined #ruby
brendan- has joined #ruby
Xeago has joined #ruby
locriani has joined #ruby
cj3kim has joined #ruby
jerius has joined #ruby
jesly has joined #ruby
pskosinski has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
rsahae has joined #ruby
moted has joined #ruby
Guest76110 has quit [Quit: We must make an idol of our fear, and call it God.]
Guest55410 is now known as heftig
heftig has quit [Changing host]
heftig has joined #ruby
havenwood has joined #ruby
vlad_starkov has joined #ruby
lnemeth has quit [Quit: Leaving]
mlr has quit [Quit: leaving]
havenwood has quit [Remote host closed the connection]
Niteside0351 has joined #ruby
<rgreen>
does anyone here have any experience with the mysql2 gem?
dwirc has quit [Read error: Operation timed out]
DeanH_ has joined #ruby
<spike|spiegel>
did it crash? that's expected.
dwirc has joined #ruby
<momomomomo>
:/
relix has joined #ruby
DeanH_ has quit [Max SendQ exceeded]
kpshek has joined #ruby
airlok has joined #ruby
vlad_starkov has quit [Ping timeout: 260 seconds]
jesly has quit [Read error: Connection reset by peer]
<rgreen>
haha why?
atmosx has joined #ruby
dribblingmachine has joined #ruby
DeanH has joined #ruby
DeanH has quit [Max SendQ exceeded]
jesly has joined #ruby
ryan has joined #ruby
krawchyk has quit [Remote host closed the connection]
DeanH has joined #ruby
dagen has joined #ruby
rgreen has quit [Quit: Page closed]
pkrnj has joined #ruby
relix has quit [Ping timeout: 240 seconds]
ryan is now known as Guest3668
Proshot has quit [Quit: Leaving]
<Guest3668>
hello
Guest3668 is now known as rgreen
sepp2k has joined #ruby
Hanmac1 has quit [Ping timeout: 260 seconds]
julweber has joined #ruby
rgreen has quit [Client Quit]
northelks has joined #ruby
<dagen>
where i can find RubyOnRails channel?
<momomomomo>
#rubyonrails
dribblingmachine has left #ruby [#ruby]
relix has joined #ruby
joshu_ has joined #ruby
fredjean has joined #ruby
joshu_ has quit [Remote host closed the connection]
breaking_ has joined #ruby
cdelo has joined #ruby
joshu_ has joined #ruby
jesly has quit [Read error: Connection reset by peer]
breakingthings has quit [Ping timeout: 264 seconds]
mnaser has quit [Ping timeout: 264 seconds]
darth_chatri has quit [Quit: Leaving.]
Uranio has quit [Quit: while you reading this, a kitty dies]
joshu has quit [Ping timeout: 264 seconds]
DrCode has quit [Ping timeout: 240 seconds]
zeromodu_ has quit [Remote host closed the connection]
zeromodulus has joined #ruby
TheNotary has quit [Ping timeout: 260 seconds]
ntus1017 has quit [Remote host closed the connection]
dash_ has quit [Ping timeout: 264 seconds]
Guest57220 has quit [Ping timeout: 264 seconds]
Guest23778 has quit [Ping timeout: 264 seconds]
whowantstolivefo has quit [Ping timeout: 264 seconds]
haxrbyte_ has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
deception has quit [Quit: Goodbye]
<dagen>
momomomomo Cannot join channel (+r) - you need to be identified with services
postmodern has joined #ruby
jesly has joined #ruby
<MrZYX>
dagen: /msg NickServ help
Guest57220 has joined #ruby
BlakeRG has joined #ruby
mnaser has joined #ruby
m8 has joined #ruby
<BlakeRG>
what does the @ symbol before a method call do? does it just surpress errors?
jarin has joined #ruby
julweber has quit [Ping timeout: 240 seconds]
monkegjinni has joined #ruby
banister`gym has quit [Remote host closed the connection]
matematikaadit has left #ruby ["Leaving"]
<apeiros>
BlakeRG: no, @foo is a variable, not a method call
<zeromodulus>
:|
<apeiros>
instance variables, they belong to an object.
<BlakeRG>
what does @ do then?
<zeromodulus>
nickserv is unavailable
JZTech101 has joined #ruby
morgz has quit [Quit: Leaving]
jesly has quit [Read error: Connection reset by peer]
<apeiros>
BlakeRG: nothing. just like the $ for global variables does nothing. it's just part of the name.
Xeago__ has quit [Read error: Connection reset by peer]
<havenwood>
rgreen: The sequel gem is great for connecting to and working with a MySQL DB. Pretty good documentation too.
Xeago has joined #ruby
pkrnj has quit [Quit: Computer has gone to sleep.]
<rgreen>
ok, i will look into it
<havenwood>
Ruby Hangout channel is #rubyhangout btw for anyone also watching.
danshultz has quit [Remote host closed the connection]
<rgreen>
would it let me save data from my tables into arrays
baroquebobcat has quit [Quit: baroquebobcat]
danshultz has joined #ruby
agjacome has quit [Ping timeout: 256 seconds]
<havenwood>
rgreen: yes
[0x1a] has quit [Quit: Connection closed for inactivity]
codesoda has joined #ruby
gstamp has joined #ruby
<rgreen>
it seems that it saves data into an array of hashes, each hash is a row. how would i go about collecting a value from each hash with the same key?>
Proshot has joined #ruby
geggam has quit [Remote host closed the connection]
<havenwood>
rgreen: Give an example input and expected output?
enebo has quit [Quit: enebo]
vlad_starkov has joined #ruby
<rgreen>
well my table would contain a column called id and a column called text, and then there would be multiple rows for the columns, and then i would want to have build an array called id_array that just had the values for the ids and a text_array that had just strings from each text entry of the table
guilleiguaran_ has joined #ruby
renderfu_ has quit [Remote host closed the connection]
BlakeRG has quit [Quit: BlakeRG]
ebobby has quit [Quit: Lost terminal]
milardovich has joined #ruby
milardovich has quit [Max SendQ exceeded]
milardovich has joined #ruby
cj3kim has joined #ruby
Es0teric has joined #ruby
jonathanwallace1 has quit [Quit: WeeChat 0.4.0]
headius has quit [Quit: headius]
milardovich has quit [Max SendQ exceeded]
vlad_starkov has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
emergion has joined #ruby
Nahra has quit [Quit: leaving]
milardovich has quit [Max SendQ exceeded]
jonathanwallace has joined #ruby
Nahra has joined #ruby
doritostains has joined #ruby
milardovich has joined #ruby
paolooo has quit [Quit: Page closed]
nemesit|znc has quit [Ping timeout: 240 seconds]
milardovich has quit [Max SendQ exceeded]
TheNotary has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
wsterling has quit [Remote host closed the connection]
zeromodulus has quit [Remote host closed the connection]
milardovich has quit [Max SendQ exceeded]
zeromodulus has joined #ruby
milardovich has joined #ruby
nemesit|znc has joined #ruby
citizensinspace has quit [Quit: citizensinspace]
milardovich has quit [Max SendQ exceeded]
mikeg has joined #ruby
milardovich has joined #ruby
Guest93412 is now known as Guga_
johnnyfuchs has quit [Remote host closed the connection]
ehaliewicz has quit [Ping timeout: 245 seconds]
c0rn has joined #ruby
milardovich has quit [Max SendQ exceeded]
predator217 has joined #ruby
CaptainJet has quit []
milardovich has joined #ruby
danbeck has quit [Quit: danbeck]
ThePicard has quit [Ping timeout: 240 seconds]
stkowski has quit [Quit: stkowski]
milardovich has quit [Max SendQ exceeded]
ehaliewicz has joined #ruby
milardovich has joined #ruby
milardovich has quit [Max SendQ exceeded]
predator117 has quit [Ping timeout: 276 seconds]
milardovich has joined #ruby
tylersmith has quit [Remote host closed the connection]
CaptainJet has joined #ruby
ner0x has joined #ruby
milardovich has quit [Max SendQ exceeded]
terrellt has joined #ruby
milardovich has joined #ruby
Synthead has quit [Ping timeout: 245 seconds]
nari has joined #ruby
renderful has joined #ruby
milardovich has quit [Max SendQ exceeded]
keyvan has joined #ruby
rgreen has quit [Ping timeout: 264 seconds]
milardovich has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
milardovich has quit [Max SendQ exceeded]
devoldmx has quit [Ping timeout: 248 seconds]
milardovich has joined #ruby
marcgg_ has quit [Read error: No route to host]
devoldmx has joined #ruby
milardovich has quit [Max SendQ exceeded]
nfk has quit [Quit: yawn]
milardovich has joined #ruby
marcgg has joined #ruby
gildo_ has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
DeanH has joined #ruby
milardovich has quit [Max SendQ exceeded]
earthquake has joined #ruby
milardovich has joined #ruby
popl has joined #ruby
milardovich has quit [Max SendQ exceeded]
milardovich has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
pkrnj has joined #ruby
bionoid has joined #ruby
Kruppe has joined #ruby
druonysus has quit [Remote host closed the connection]
JZTech101 has joined #ruby
druonysus has joined #ruby
milardovich has quit [Max SendQ exceeded]
erdos has joined #ruby
pipework has quit [Remote host closed the connection]
bionoid has quit [Remote host closed the connection]
<erdos>
hey there, i have a capistrano question, is it ok to ask in here?
milardovich has joined #ruby
jalcine has quit [Excess Flood]
milardovich has quit [Max SendQ exceeded]
citizensinspace has joined #ruby
Ziarkaen` has quit [Remote host closed the connection]
milardovich has joined #ruby
rhys_ has quit [Quit: Leaving]
milardovich has quit [Max SendQ exceeded]
milardovich has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
marcgg has quit [Read error: Connection reset by peer]
bradhe has quit [Remote host closed the connection]
wimplash has joined #ruby
marcgg has joined #ruby
citizensinspace has quit [Quit: citizensinspace]
bradhe has joined #ruby
Hanmac1 has joined #ruby
nemesit|znc has quit [Ping timeout: 240 seconds]
DeanH has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bradhe_ has joined #ruby
bradhe has quit [Read error: Connection reset by peer]
Drakevr has quit [Changing host]
Drakevr has joined #ruby
zeade has quit [Quit: Leaving.]
Hanmac1 has quit [Ping timeout: 245 seconds]
tommyvyo has quit [Quit:]
jmimi has left #ruby [#ruby]
milardovich has quit [Quit: Leaving]
nemesit|znc has joined #ruby
viszu has joined #ruby
wimplash has quit [Quit: Leaving...]
matt-chars has joined #ruby
dEPy has quit [Remote host closed the connection]
pygospa has quit [Disconnected by services]
TheRealPygo has joined #ruby
BRMatt has quit [Quit: Leaving]
<matt-chars>
I've got a project with a lot of static pages, but I'd like to share layouts across it. I'm considering using jekyll. but in the future I might want to have a user registration system. Should I just do it all in Rails?