<d-s>
Is there a nice way to force rspec controller spec to allow for put requests with query string in addition to normal params ?
hololeap has quit [Ping timeout: 240 seconds]
hololeap has joined #ruby
<timnelson>
\q
timnelson has quit [Quit: leaving]
<adam12>
o/
<adam12>
:)
henk has joined #ruby
<henk>
hi, I want to 'require' a ruby file that in turn should load other files in the same directory as itself, which is not Dir.pwd. »require './foo.rb'« looks for the file in the directory of the script I’m running, not the directory of the file I put this code in. any way to do that?
<tuxcrafter>
you can i run this command: zammad run rails r 'Setting.set('http_type', "http")' -> Please specify a valid ruby command or the path of a script to run. while using zammad run rails c then Setting.set('http_type', "http") works
weaksauce has joined #ruby
oxfuxxx has joined #ruby
mahlon has joined #ruby
oxfuxxx has quit [Ping timeout: 260 seconds]
oxfuxxx has joined #ruby
_ht has joined #ruby
srinidhi has joined #ruby
oxfuxxx has quit [Ping timeout: 252 seconds]
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 250 seconds]
<adam12>
tuxcrafter: You are mixing quote types.
oxfuxxx has joined #ruby
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
oxfuxxx has quit [Ping timeout: 252 seconds]
Tasi has quit [Ping timeout: 260 seconds]
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 260 seconds]
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
oxfuxxx has joined #ruby
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
ivanf has quit [Remote host closed the connection]
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
oxfuxxx has quit [Ping timeout: 240 seconds]
mahlon has quit [Ping timeout: 245 seconds]
ged has quit [Ping timeout: 256 seconds]
oxfuxxx has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oxfuxxx has quit [Ping timeout: 260 seconds]
Rounin has joined #ruby
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 256 seconds]
ivanf has joined #ruby
oxfuxxx has joined #ruby
Sheilong has quit [Quit: Connection closed for inactivity]
oxfuxxx has quit [Ping timeout: 256 seconds]
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 240 seconds]
<oz>
How do you "destructure" a list of Hash in Ruby3 these days? Ruby 2 was like: [{:foo=>1, :bar=>1}, {:foo=>2, :bar=>2}].each { |foo:, bar:| ... }
<oz>
this gives an ArgumentError as the block expects a Hash, and it's not auto-** in that case.
markong has quit [Ping timeout: 260 seconds]
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 245 seconds]
unyu has quit [Ping timeout: 240 seconds]
justOkay has quit [Read error: Connection reset by peer]
justOkay has joined #ruby
tuxcrafter has quit [Quit: Client closed]
tuxcrafter has joined #ruby
oxfuxxx has joined #ruby
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
howdoi has joined #ruby
oxfuxxx has quit [Ping timeout: 252 seconds]
Thanzex has quit [Read error: Connection reset by peer]
<oz>
adam12: thanks for the pointer. I'm updating a lot of code due to this change, from someone who relied on it a lot. :)
Thanzex has quit [Read error: Connection reset by peer]
<adam12>
oz: It was definitely handy at the time. I used it a bunch.
Thanzex has joined #ruby
<oz>
So far, I've opted for using a single named parameter, and expanding the hash into variables where it makes sense.
<adam12>
Now I might try to use pattern matching. .each { |row| row in {foo:, bar:} } or something
<adam12>
err, row => {foo:, bar:}
<adam12>
I think? that would work. Or just values_at
<oz>
I'm using pattern matching too, but haven't benchmarked against other idioms. Maybe it's not the most efficient, but in that particular case it's not very important.
emcb5 has quit [Read error: Connection reset by peer]
oxfuxxx has quit [Ping timeout: 252 seconds]
unyu has joined #ruby
d-s has quit [Remote host closed the connection]
d-s has joined #ruby
emcb5 has joined #ruby
oxfuxxx has joined #ruby
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
Thanzex has quit [Read error: Connection reset by peer]
oxfuxxx has quit [Ping timeout: 240 seconds]
Thanzex has joined #ruby
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 252 seconds]
perrierjouet has quit [Ping timeout: 256 seconds]
d-s|pl has joined #ruby
oxfuxxx has joined #ruby
d-s has quit [Ping timeout: 250 seconds]
d-s|pl has quit [Remote host closed the connection]
d-s has joined #ruby
oxfuxxx has quit [Ping timeout: 256 seconds]
oxfuxxx has joined #ruby
oxfuxxx has quit [Client Quit]
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 245 seconds]
d-s has quit [Remote host closed the connection]
d-s has joined #ruby
pgib has joined #ruby
oxfuxxx has joined #ruby
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
mahlon has joined #ruby
oxfuxxx has quit [Ping timeout: 268 seconds]
ur5us has joined #ruby
oxfuxxx has joined #ruby
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
oxfuxxx has quit [Ping timeout: 252 seconds]
d-s has quit [Remote host closed the connection]
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
_ht has quit [Remote host closed the connection]
o|||||o has quit [Ping timeout: 260 seconds]
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
unyu has quit [Ping timeout: 250 seconds]
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
reset has quit [Quit: reset]
d-s has joined #ruby
o|||||o has joined #ruby
d-s has quit [Remote host closed the connection]
markong has joined #ruby
srinidhi has quit [Ping timeout: 252 seconds]
gcd has quit [Quit: leaving]
Thanzex has quit [Read error: Connection reset by peer]
Thanzex6 has joined #ruby
Thanzex6 has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
gproto23 has quit [Remote host closed the connection]
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
unyu has joined #ruby
Thanzex has quit [Read error: Connection reset by peer]
Thanzex1 has joined #ruby
srinidhi has joined #ruby
Thanzex1 has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
<wand>
i have a question about threads.
<wand>
if i dont do thread.join on worker threads, they never run. but by joining them, don't they block?
<wand>
i want worker threads to run asyncronously in the background without blocking main program flow
<wand>
note: i am always running .join on my main, producer thread
<adam12>
wand: I don't think you have to join, per say
<adam12>
wand: But think of join as waiting. If you don't wait, then the threads exit when the main thread exits.
<adam12>
wand: Maybe that's what you're seeing?
<wand>
adam12: that makes sense i think. thanks
srinidhi has quit [Ping timeout: 260 seconds]
<wand>
is it unwise to run threads within threads?
<wand>
i suppose they would all spawn in the same process space anyway