havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.7.1, 2.6.6, 2.5.8: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
mossplix has joined #ruby
markong has quit [Ping timeout: 264 seconds]
troulouliou_dev has quit [Quit: Leaving]
ur5us has quit [Ping timeout: 256 seconds]
mossplix has quit [Remote host closed the connection]
greengriminal has quit [Quit: Leaving]
ur5us has joined #ruby
bambanx has quit [Ping timeout: 240 seconds]
mossplix has joined #ruby
oddp has quit [Ping timeout: 240 seconds]
mossplix has quit [Ping timeout: 240 seconds]
bambanx has joined #ruby
mossplix has joined #ruby
thejs has joined #ruby
braincra- has joined #ruby
sh7d has quit [Ping timeout: 260 seconds]
braincrash has quit [Ping timeout: 260 seconds]
lemon395 has joined #ruby
<lemon395> Hey
lemon395 has quit [Client Quit]
lemon395 has joined #ruby
<lemon395> Does anyone know what this error means? #<TypeError: can't quote Hash>
sh7d has joined #ruby
<lemon395> I'm still here, I'm just leaving on this nick
lemon395 has left #ruby [#ruby]
akem__ has quit [Quit: Leaving]
drincruz has joined #ruby
stryek has quit [Quit: Connection closed for inactivity]
sh7d has quit [Ping timeout: 240 seconds]
bodie has quit [Ping timeout: 264 seconds]
sh7d has joined #ruby
drincruz has quit [Ping timeout: 265 seconds]
<adam12> lemon395 or whoever: it's fairly generic. we'd need a stack trace to make a better guess.
mossplix has quit [Remote host closed the connection]
bodie has joined #ruby
thejs has quit [Quit: Leaving]
ChmEarl has quit [Quit: Leaving]
lmat has quit [Ping timeout: 240 seconds]
lmat has joined #ruby
baojg has quit [Remote host closed the connection]
baojg_ has joined #ruby
isakovic has joined #ruby
baojg_ has quit [Remote host closed the connection]
isakovic has quit [Client Quit]
tucansam has joined #ruby
baojg has joined #ruby
tucansam is now known as toucansam
toucansam is now known as tonythetiger
tonythetiger has left #ruby [#ruby]
mossplix has joined #ruby
<pwnd_nsfw> Seems to be a type error
<pwnd_nsfw> with some redacted error information
bodie has quit [Ping timeout: 260 seconds]
lemon39530 has joined #ruby
<lemon39530> Hey yeah it's lemon
<lemon39530> I fixed it, I don't actually know how I did it
<lemon39530> But I guess that's the nature of everything :)
lemon39530 is now known as dokkaebi
lmat has quit [Ping timeout: 264 seconds]
<pwnd_nsfw> lol..
lmat has joined #ruby
memcorrupt has joined #ruby
<memcorrupt> hello, I wrote this code https://dpaste.org/y2Of and these test cases https://dpaste.org/LkVJ for it... am I overtesting?
<adam12> memcorrupt: It looks fine but why test to_i twice?
<adam12> Oooh.
<adam12> You have a class method .to_i
mossplix has quit [Remote host closed the connection]
<dokkaebi> memcorrupt: I like it :)
mossplix has joined #ruby
<memcorrupt> thanks dokkaebi
gix has quit [Ping timeout: 240 seconds]
<havenwood> The "can't quote Hash" was from ActiveRecord (crosspost from Gitter).
<havenwood> Usually no convos on Gitter ¯\_(ツ)_/¯
mossplix has quit [Remote host closed the connection]
<dokkaebi> Yeah that was me that asked that
<havenwood> dokkaebi: Aha!
braincra- has quit [Quit: bye bye]
braincrash has joined #ruby
mossplix has joined #ruby
bruce_lee has quit [Ping timeout: 260 seconds]
bruce_lee has joined #ruby
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
dokkaebi has quit [Ping timeout: 245 seconds]
Eiam has quit [Ping timeout: 258 seconds]
memcorrupt has quit [Ping timeout: 240 seconds]
wymillerlinux has quit [Ping timeout: 260 seconds]
memcorrupt has joined #ruby
memcorrupt has joined #ruby
memcorrupt has quit [Changing host]
<havenwood> &>> [[0, '-', :todo], [1, 'x', :doing], [2, '+', :done]].each_with_index.reduce({}) { |acc, (keys, i)| acc.merge(keys.zip([i].cycle).to_h) }
<rubydoc> # => {0=>0, "-"=>0, :todo=>0, 1=>1, "x"=>1, :doing=>1, 2=>2, "+"=>2, :done=>2} (https://carc.in/#/r/9foe)
<havenwood> memcorrupt: Maybe consider using a single Hash ^
<havenwood> _.fetch(stat) { raise TypeError, 'expected ...' }
<havenwood> though I think I prefer I KeyError
<havenwood> _.fetch(stat)
alfiemax has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
konsolebox has quit [Read error: Connection reset by peer]
akem has joined #ruby
akem has quit [Max SendQ exceeded]
<memcorrupt> yeah, a KeyError is more declarative...
<memcorrupt> havenwood: hmmmh... yeah, that seems like a nice trick... reduces much of the code
konsolebox has joined #ruby
<havenwood> memcorrupt: Here are some ideas :) https://gist.github.com/havenwood/85499665e4e228b709fddd2b63c7b342
cthu| has quit [Ping timeout: 240 seconds]
<havenwood> memcorrupt: An upside ^ is it's fast. Yeah, and little code.
<havenwood> memcorrupt: Was fun to take a stab at, in any case. Thanks for sharing the code.
<memcorrupt> oh, thank *you* for the tip :)
gavlee has quit [Excess Flood]
sagax has joined #ruby
gavlee has joined #ruby
mossplix has quit [Remote host closed the connection]
alfiemax_ has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
chalkmonster has joined #ruby
bambanx_ has joined #ruby
SeepingN has quit [Ping timeout: 260 seconds]
memcorrupt has quit [Ping timeout: 246 seconds]
gavlee has quit [Excess Flood]
gavlee has joined #ruby
bambanx has quit [Ping timeout: 240 seconds]
bambanx_ has quit [Quit: Leaving]
konsolebox has quit [Read error: Connection reset by peer]
konsolebox has joined #ruby
ur5us has quit [Ping timeout: 256 seconds]
bocaneri has joined #ruby
r3m has quit [Quit: WeeChat 2.9-rc1]
Furai has quit [Quit: WeeChat 2.9]
Furai has joined #ruby
r3m_ has joined #ruby
Arahael has quit [Ping timeout: 264 seconds]
schne1der has joined #ruby
baojg has quit [Remote host closed the connection]
baojg_ has joined #ruby
Arahael has joined #ruby
schne1der has quit [Quit: schne1der]
schne1der has joined #ruby
r3m_ is now known as r3m
baojg_ has quit [Remote host closed the connection]
mossplix has joined #ruby
baojg has joined #ruby
r3m has quit [Quit: WeeChat 2.9-rc1]
r3m has joined #ruby
r3m has quit [Client Quit]
r3m has joined #ruby
vondruch has joined #ruby
cd has quit [Quit: cd]
znz_jp has quit [Remote host closed the connection]
konsolebox has quit [Read error: Connection reset by peer]
znz_jp has joined #ruby
konsolebox has joined #ruby
dfucci has joined #ruby
schne1der has quit [Ping timeout: 240 seconds]
dfucci has quit [Ping timeout: 256 seconds]
arzWZM has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
konsolebox has joined #ruby
TomyWork has joined #ruby
Jonopoly has joined #ruby
yxhuvud has quit [Read error: Connection reset by peer]
yxhuvud has joined #ruby
apteryx is now known as Guest4223
apteryx has joined #ruby
_aeris_ has quit [Ping timeout: 240 seconds]
Guest4223 has quit [Ping timeout: 256 seconds]
memcorrupt has joined #ruby
memcorrupt has joined #ruby
memcorrupt has quit [Changing host]
schne1der has joined #ruby
sagax has quit [Remote host closed the connection]
fanta1 has joined #ruby
giorgian has joined #ruby
Axy has joined #ruby
Axy has joined #ruby
Axy has quit [Changing host]
imode has quit [Ping timeout: 256 seconds]
fercell has joined #ruby
TomyWork has quit [Ping timeout: 256 seconds]
Mia has quit [Ping timeout: 240 seconds]
fercell has quit [Ping timeout: 260 seconds]
fercell has joined #ruby
lxsameer has joined #ruby
TomyWork has joined #ruby
ur5us has joined #ruby
mossplix_ has joined #ruby
mossplix has quit [Ping timeout: 264 seconds]
TomyWork has quit [Ping timeout: 256 seconds]
TomyWork has joined #ruby
lmat has quit [Ping timeout: 260 seconds]
lmat has joined #ruby
mossplix_ has quit [Remote host closed the connection]
lesihctej has joined #ruby
oddp has joined #ruby
jetchisel has quit [Ping timeout: 240 seconds]
lmat has quit [Ping timeout: 246 seconds]
alfiemax_ has quit [Remote host closed the connection]
lmat has joined #ruby
yxhuvud has quit [Remote host closed the connection]
alfiemax has joined #ruby
lemon has joined #ruby
<lemon> Hey guys
lesihctej has quit [Ping timeout: 258 seconds]
bodie has joined #ruby
zapata has quit [Ping timeout: 260 seconds]
<memcorrupt> hi
_aeris_ has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
lmat has quit [Ping timeout: 258 seconds]
memcorrupt has quit [Ping timeout: 258 seconds]
lmat has joined #ruby
konsolebox has joined #ruby
yxhuvud has joined #ruby
seaef has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
cnsvc has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
lmat has quit [Ping timeout: 258 seconds]
lmat has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.9]
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
arzWZM has quit [Ping timeout: 256 seconds]
arzWZM has joined #ruby
troulouliou_div2 has joined #ruby
lmat has quit [Ping timeout: 246 seconds]
<rapha> hi lemon
DEac- has quit [Ping timeout: 264 seconds]
lmat has joined #ruby
chalkmonster has joined #ruby
TomyWork has quit [Remote host closed the connection]
TomyWork has joined #ruby
cnmne has joined #ruby
Arkantos has quit [Quit: ZNC 1.6.6+deb1ubuntu0.2 - http://znc.in]
seaef has quit [Quit: I am functioning within established parameters.]
TomyLobo2 has joined #ruby
TomyWork has quit [Disconnected by services]
TomyLobo2 is now known as TomyWork
TomyLobo2 has joined #ruby
bodie has quit [Quit: Leaving]
yokel has quit [Ping timeout: 256 seconds]
yokel has joined #ruby
DEac- has joined #ruby
TomyLobo2 has quit [Quit: Leaving]
chalkmonster has quit [Quit: WeeChat 2.9]
<cnmne> Hi, I'm adding a package to guix and I'm getting a MissingSpecVersionError for a spec of ["= 0.10.0", "~> 0.10"] when I have 0.11.0; Is this not supposed to be included pessimistically ?
ur5us has quit [Ping timeout: 260 seconds]
fercell has quit [Ping timeout: 240 seconds]
akem has joined #ruby
fercell has joined #ruby
<cnmne> update: I haven't figured it out, but I think this might be a guix issue, not ruby. thanks !
cnmne has left #ruby ["ERC (IRC client for Emacs 26.3)"]
lmat has quit [Ping timeout: 258 seconds]
purefan has joined #ruby
lmat has joined #ruby
<purefan> Hello! I found this code in a project I recently joined (https://dpaste.org/aQeX) and I cant see where is params defined, Im new to ruby and dont know if this is somehow initialized by the language or from an initiation call
<purefan> I mean the line with org_image_uri = URI(params[:original_image_uri].to_s).path[1..-1]
<purefan> I found a hidden input with name "original_image_uri" which I suspect becomes a sort of global variable accessible via params
<purefan> ok sorry for the spam, I answered my own question by searching better: "In Ruby, the uploaded file is available in the params global variable." -https://froala.com/wysiwyg-editor/docs/sdks/ruby/file-server-upload/
konsolebox has quit [Read error: Connection reset by peer]
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
Jonopoly has quit [Quit: WeeChat 2.8]
konsolebox has joined #ruby
donofrio has joined #ruby
lmat has quit [Ping timeout: 256 seconds]
lmat has joined #ruby
vondruch_ has joined #ruby
vondruch has quit [Ping timeout: 240 seconds]
vondruch_ is now known as vondruch
RiPuk_ has joined #ruby
RiPuk has quit [Ping timeout: 258 seconds]
akem_ has joined #ruby
akem has quit [Ping timeout: 258 seconds]
akem_ has quit [Ping timeout: 265 seconds]
RiPuk_ has quit [Ping timeout: 240 seconds]
RiPuk has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
drincruz has joined #ruby
markong has joined #ruby
RiPuk has quit [Quit: ZNC 1.8.1 - https://znc.in]
RiPuk has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
gigetoo has quit [Ping timeout: 256 seconds]
gigetoo has joined #ruby
zapata has joined #ruby
zapata has quit [Ping timeout: 260 seconds]
drincruz has quit [Ping timeout: 265 seconds]
ruurd_ has joined #ruby
drincruz has joined #ruby
akem has joined #ruby
ruurd has quit [Ping timeout: 240 seconds]
akem has quit [Max SendQ exceeded]
purefan has quit [Ping timeout: 260 seconds]
alfiemax has quit [Remote host closed the connection]
baojg has quit [Remote host closed the connection]
alfiemax has joined #ruby
baojg has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
markong has quit [Ping timeout: 240 seconds]
markoong has joined #ruby
drincruz has quit [Ping timeout: 260 seconds]
drincruz has joined #ruby
jottr has joined #ruby
jottr has quit [Client Quit]
konsolebox has quit [Read error: Connection reset by peer]
dviola has joined #ruby
konsolebox has joined #ruby
cliluw has quit [Ping timeout: 256 seconds]
baojg has quit [Remote host closed the connection]
cliluw has joined #ruby
baojg has joined #ruby
chalkmonster has joined #ruby
ChmEarl has joined #ruby
TomyWork has quit [Remote host closed the connection]
TomyWork has joined #ruby
fanta1 has quit [Quit: fanta1]
_whitelogger has joined #ruby
schne1der has quit [Ping timeout: 258 seconds]
mossplix has joined #ruby
apteryx is now known as Guest4026
Guest4026 has quit [Killed (moon.freenode.net (Nickname regained by services))]
apteryx has joined #ruby
apteryx is now known as Guest13088
Guest13088 has quit [Killed (rajaniemi.freenode.net (Nickname regained by services))]
apteryx has joined #ruby
apteryx is now known as Guest93264
Guest93264 has quit [Killed (egan.freenode.net (Nickname regained by services))]
apteryx has joined #ruby
apteryx is now known as Guest23268
Guest23268 has quit [Killed (moon.freenode.net (Nickname regained by services))]
apteryx has joined #ruby
apteryx has quit [Killed (rajaniemi.freenode.net (Nickname regained by services))]
ellcs has joined #ruby
wymillerlinux has joined #ruby
markoong has quit [Ping timeout: 240 seconds]
chalkmonster has quit [Quit: WeeChat 2.9]
sagax has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
alfiemax has joined #ruby
ellcs has quit [Ping timeout: 260 seconds]
giorgian has quit [Ping timeout: 260 seconds]
Caerus has quit [Ping timeout: 256 seconds]
zapata has joined #ruby
alfiemax has quit [Remote host closed the connection]
mossplix has quit [Read error: Connection reset by peer]
mossplix has joined #ruby
mossplix_ has joined #ruby
mossplix has quit [Ping timeout: 246 seconds]
schne1der has joined #ruby
dviola has quit [Quit: WeeChat 2.9]
Caerus has joined #ruby
mika_ has joined #ruby
cthu| has joined #ruby
Caerus has quit [Ping timeout: 256 seconds]
Caerus has joined #ruby
mnathani_ has joined #ruby
Eiam has joined #ruby
ferche23 has joined #ruby
mnathani has quit [Ping timeout: 256 seconds]
ferche23 has quit [Client Quit]
mika_ has quit [Quit: Leaving]
chalkmonster has joined #ruby
schne1der has quit [Ping timeout: 256 seconds]
wallace_mu has joined #ruby
<wallace_mu> any one knows anything about moving a slow query into a different database? basically, it's taking some good resource in production and want to figure a way to let it query against secondary db
<uplime> is there a better way to test if a string is a number besides https://clbin.com/MT28z? I'd ideally like to test/convert from any arbitrary base
<uplime> (it'd also be nice if it worked with floating point as well)
cd has joined #ruby
alfiemax has joined #ruby
<wallace_mu> uplime: regular expression?
<uplime> hm, i may have to go that route
<uplime> im just hoping for something a bit easier to maintain
alfiemax has quit [Ping timeout: 240 seconds]
fercell has quit [Quit: WeeChat 2.8]
wymillerlinux has quit [Ping timeout: 240 seconds]
davispuh has joined #ruby
TomyWork has quit [Remote host closed the connection]
<adam12> wallace_mu: If you're using Sequel you can force the database to query against. I'm not sure about Rails but the new version of ActiveRecord supports multiple databases.
<adam12> uplime: !!Float(self) rescue false
<adam12> uplime: Tho if I was using that in production I'd not inline rescue but actually rescue ArgumentError
TomyWork has joined #ruby
<uplime> adam12: not a web app unfortunately :( rails/ar always has the neat toys
<uplime> that Float thing looks good though. ill give it a try. thanks!
<adam12> uplime: You mentioned base but didn't see you using it. You might need something else if you're supporting bases other than 10.
<al2o3-cr> uplime: you can pass exception: keyword to float e.g !!Float(self, exception: false)
<adam12> Yes, exactly. if you're on a newer version of Ruby, definitely prefer the non-exception case since it's likely faster.
<uplime> thanks folks. i'll give that link a read and consider my options
<uplime> (also yeah, 2.7, so that exception key is neat)
zapata has quit [Quit: WeeChat 2.9]
purefan has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.9]
rhiza has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
purefan has quit [Ping timeout: 258 seconds]
zapata has joined #ruby
ellcs has joined #ruby
orbyt_ has joined #ruby
konsolebox has joined #ruby
orbyt_ has quit [Client Quit]
<al2o3-cr> Hash#transform_keys in 2.8/3.0 will take a hash mapping keys, that is very useful.
alexherbo2 has joined #ruby
Caerus has quit [Ping timeout: 240 seconds]
lightstalker has quit [Ping timeout: 256 seconds]
alexherbo29 has joined #ruby
alexherbo2 has quit [Ping timeout: 264 seconds]
alexherbo29 has quit [Ping timeout: 260 seconds]
alexherbo2 has joined #ruby
mossplix_ has quit [Remote host closed the connection]
lightstalker has joined #ruby
<leftylink> I like the sound of that
TomyWork has quit [Remote host closed the connection]
<leftylink> though
<leftylink> I imagine I can already attain a similar effect by using Hash#to_proc wouldn't I...
<al2o3-cr> i tried already
<al2o3-cr> &>> {:a=>100, :b=>200, :c=>300}.transform_keys &h
<rubydoc> stderr: -e:4:in `<main>': undefined local variable or method `h' for main:Object (NameError)... check link for more (https://carc.in/#/r/9frp)
<al2o3-cr> &>> h={:a=>100, :b=>200, :c=>300}.transform_keys &h
<rubydoc> # => #<Enumerator: {:a=>100, :b=>200, :c=>300}:transform_keys> (https://carc.in/#/r/9frq)
<al2o3-cr> &>> h={:a=>100, :b=>200, :c=>300}; h.transform_keys &h
<rubydoc> # => {100=>100, 200=>200, 300=>300} (https://carc.in/#/r/9frr)
<al2o3-cr> Hash#to_proc maps keys to values.
<leftylink> I think the current behavior of transform_keys &h that you have just demonstrated above is also exactly what I'd expect transform_keys h to do
<al2o3-cr> well, yeah.
<leftylink> oho! I think I see that there will be a difference
<leftylink> for keys not in the hash, staying the same vs becoming nil
<al2o3-cr> leftylink: that's how i understood it too.
<leftylink> that is interesting then
<leftylink> I wonder why it was decided not to do the same for transform_values
<al2o3-cr> leftylink: because Matz says so i suppose :P
alexherbo2 has quit [Ping timeout: 240 seconds]
mossplix has joined #ruby
tubbo has quit [Ping timeout: 260 seconds]
alexherbo2 has joined #ruby
gix has joined #ruby
hiroaki has joined #ruby
bocaneri has quit [Remote host closed the connection]
alexherbo2 has quit [Ping timeout: 240 seconds]
alexherbo2 has joined #ruby
Caerus has joined #ruby
alexherbo2 has quit [Ping timeout: 240 seconds]
<al2o3-cr> if key is not in the mapping it either yields if given a block or set new_key as original key.
akem_ has joined #ruby
ruurd_ has quit [Quit: Textual IRC Client: www.textualapp.com]
ruurd has joined #ruby
vondruch_ has joined #ruby
<al2o3-cr> very very nice
vondruch has quit [Ping timeout: 258 seconds]
vondruch_ is now known as vondruch
rhiza has quit [Remote host closed the connection]
BenDover has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
<leah2> challenge unlocked: nest <<HEREDOC
alexherbo2 has joined #ruby
ruurd_ has joined #ruby
troulouliou_div2 has quit [Ping timeout: 260 seconds]
ruurd has quit [Ping timeout: 240 seconds]
konsolebox has joined #ruby
<al2o3-cr> what's that leah2?
<leah2> <<EOF ... #{something || <<EOI} ... EOI ... EOF
<leah2> with newlines ofc
<al2o3-cr> oh, nesting heredocs i see :)
donofrio has quit [Remote host closed the connection]
troulouliou_div2 has joined #ruby
Ai9zO5AP has joined #ruby
cnsvc has joined #ruby
rmnull has joined #ruby
rmnull has quit [Client Quit]
rmnull has joined #ruby
dionysus69 has quit [Remote host closed the connection]
<leftylink> it's good but my editor just doesn't understand how to syntax highlight it (the portion of the outer one that comes after the inner one is no longer recognised as being in a heredoc)
<wallace_mu> adam12: thanks for mentioning, we're using rails 3 and default active record, without sequal but would like to check sequel
FastJack has quit [Ping timeout: 246 seconds]
cthu| has quit [Read error: Connection reset by peer]
mossplix has quit [Remote host closed the connection]
cthu| has joined #ruby
VeryBewitching has joined #ruby
orbyt_ has joined #ruby
<VeryBewitching> I'm getting a weird result with FileUtils.cp_r I'm trying to backup certain files with an absolute path to another absolute path, and all it ends up copying is the file at the end of the path.
FastJack has joined #ruby
<VeryBewitching> So doing: FileUtils.cp_r '/home/foo/file.csv', '/Storage' results in /Storage/file.csv and not /Storage/home/foo/file.csv
<VeryBewitching> Can anyone shed some light on this?
<rmnull> yes that is the expected behaviour similar to `cp -r`
bukkitgerman8608 has quit [Quit: Ping timeout (120 seconds)]
<VeryBewitching> If I did that with cp -r I'd get the whole tree
<VeryBewitching> I know because I tried it
<VeryBewitching> How then, in Ruby, would I be able to copy the whole tree?
bukkitgerman8608 has joined #ruby
<rmnull> cp -r --preserve maintains the whole tree
<rmnull> you'll have to pass preserve option i believe
<rmnull> s/preserve/parents/
<VeryBewitching> Preserve preserves permissions
<rmnull> s/preserve/parents/
<VeryBewitching> parents is not an option for FileUtils.cp_r
<rmnull> oh, do u wish to copy all the files inside directory ? or just a single one
<VeryBewitching> Just a single file, and it's tree
<rmnull> ohkay, let me lookup doc
bukkitgerman8608 has quit [Ping timeout: 246 seconds]
jetchisel has joined #ruby
purefan has joined #ruby
Itsame1 has joined #ruby
Itsame1 has left #ruby [#ruby]
alexherbo2 has quit [Quit: The Lounge - https://thelounge.chat]
<rmnull> VeryBewitching: you are right, looks like there is no option to FileUtils.cp_r that emulates `cp -r --parents`
<VeryBewitching> Well even `cp -r` will produce the effect I want
<VeryBewitching> You don't need --parents
<VeryBewitching> And OK, I guess I'll sort out using dirname and mkdir_p
<leftylink> hmm, I guess your computer must be set up differently from mine
<leftylink> mkdir -p a/b; touch a/b/x.csv; mkdir c; cp -r a/b/x.csv c; ls c
<leftylink> that gets me x.csv
<leftylink> so we must be different
<leftylink> so basically if that code is going to run in different places, you might need to take that difference into account
<VeryBewitching> Oh you're right lefty, I don't get the *whole* tree, I get the missing piece from pwd
<rmnull> im on same page as leftylink
<VeryBewitching> You're both right, cp -r --parents is required for the entire ancestry
BrianWGray has joined #ruby
<VeryBewitching> But good to know about :cp_r
i9zO5AP has joined #ruby
Ai9zO5AP has quit [Ping timeout: 240 seconds]
rhiza has joined #ruby
bukkitgerman8608 has joined #ruby
<rhiza> I'm trying to eager load a limited association in Hanami / rom-rb. A company has activities, but I want to only load the two latest activities for each company. I have a SQL query that does this, but I'm having trouble figuring out how to write this in rom-rb syntax. SQL query for reference:
mossplix has joined #ruby
bukkitgerman8608 has quit [Quit: Ping timeout (120 seconds)]
Omnilord has joined #ruby
bukkitgerman8608 has joined #ruby
rmnull has quit [Quit: WeeChat 2.9]
tbisker8 has quit [Ping timeout: 246 seconds]
BSaboia has quit [Ping timeout: 240 seconds]
titanbiscuit has joined #ruby
cthu| has quit [Read error: Connection reset by peer]
cthu| has joined #ruby
lightstalker has quit [Ping timeout: 240 seconds]
rhiza has quit [Remote host closed the connection]
ur5us has joined #ruby
lightstalker has joined #ruby
mossplix_ has joined #ruby
mossplix_ has quit [Remote host closed the connection]
mossplix has quit [Ping timeout: 240 seconds]
bambanx has joined #ruby
Frobozz has joined #ruby
EvanR has left #ruby [#ruby]
ellcs has quit [Ping timeout: 260 seconds]
lightstalker has quit [Ping timeout: 240 seconds]
hiroaki has quit [Ping timeout: 272 seconds]
swaggboi has joined #ruby
BSaboia has joined #ruby
lightstalker has joined #ruby
BSaboia has quit [Max SendQ exceeded]
BSaboia has joined #ruby
markoong has joined #ruby
BSaboia has quit [Ping timeout: 272 seconds]
BSaboia has joined #ruby
BSaboia has quit [Ping timeout: 272 seconds]
contradictioned has quit [Remote host closed the connection]
bambanx has quit [Read error: Connection reset by peer]
TomyWork has joined #ruby
BenDover has quit [Quit: BenDover]
contradictioned has joined #ruby
shaco has joined #ruby
lightstalker has quit [Ping timeout: 256 seconds]
schne1der has joined #ruby
<shaco> hello
VeryBewitching has quit [Quit: Konversation terminated!]
akem_ has quit [Read error: Connection reset by peer]
<shaco> i want a good debugger
<shaco> for sublime.text
lightstalker has joined #ruby
shaco has left #ruby [#ruby]
schne1der has quit [Ping timeout: 256 seconds]
markong has joined #ruby
markoong has quit [Ping timeout: 240 seconds]
stooj has quit [Read error: Connection reset by peer]
akem has joined #ruby
arzWZM has quit [Ping timeout: 240 seconds]
arzWZM has joined #ruby
Scriptonaut has joined #ruby
<Scriptonaut> hey all, I had a security check of a system I manage, and the people running the check complained that the jobs in my resque queue aren't "signed" or "authenticated". Resque runs on another machine on the private network, and connects to the database and redis, getting its jobs from there. Have you guys ever heard of signing jobs before Resque picks them up?
i9zO5AP has quit [Remote host closed the connection]
<havenwood> Scriptonaut: Usually just stunnel, in previous jobs I've had.
<havenwood> Scriptonaut: I don't know of a standard signing scheme.
<havenwood> Scriptonaut: Is it possible they mean wrapping the Redis traffic in stunnel? Or are the jobs themselves looking for signing, it sounds like?
purefan has quit [Ping timeout: 265 seconds]
<havenwood> Scriptonaut: Maybe they've set up JWTs or some other web sig.
<havenwood> If so, I'd expect it to be ad hoc, since I don't know of a standard redis or resque mechanism.
<Scriptonaut> havenwood: I asked for clarification but ya it was somewhat vague. The resque server doesn't have an external IP, neither does the redis server, and the redis server is password protected. It sounds like they want the jobs themselves to be "signed" before being accepted by the queue
<Scriptonaut> also, redis and resque are both behind firewalls, they communicate on this private network
<Scriptonaut> hmm, stunnel could help for sure, I will bring this up, thanks
ruurd_ has quit [Read error: Connection reset by peer]
ruurd has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
troulouliou_dev has joined #ruby
joast has quit [Quit: Leaving.]
Omnilord has quit [Quit: Leaving]
TomyWork has quit [Remote host closed the connection]
joast has joined #ruby
Xiti has quit [Quit: Leaving]
markong has quit [Ping timeout: 240 seconds]
cthu| has quit [Ping timeout: 256 seconds]
drincruz has quit [Ping timeout: 240 seconds]
konsolebox has quit [Read error: Connection reset by peer]
Xiti has joined #ruby
Secret-Fire has quit [Remote host closed the connection]
konsolebox has joined #ruby
Secret-Fire has joined #ruby
CalimeroTeknik has quit [Quit: バイバイ]
CalimeroTeknik has joined #ruby
Secret-Fire has quit [Remote host closed the connection]
Secret-Fire has joined #ruby
davispuh has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
Frobozz has quit [Read error: Connection reset by peer]
Secret-Fire has quit [Remote host closed the connection]
Frobozz has joined #ruby
Secret-Fire has joined #ruby
_aeris_ has quit [Remote host closed the connection]
_aeris_ has joined #ruby
CalimeroTeknik has quit [Quit: バイバイ]
lucasb has joined #ruby
CalimeroTeknik has joined #ruby