baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.3, 2.5.5, 2.4.6: 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!
jmcgnh has quit [Client Quit]
skryking_ has joined #ruby
skryking__ has quit [Ping timeout: 258 seconds]
jenrzzz has quit [Ping timeout: 250 seconds]
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
Swyper has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
<bga57> .
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cfjk has quit [Read error: Connection reset by peer]
D9 has quit [Quit: Leaving]
jelera has joined #ruby
cschneid has quit []
dsmythe has quit [Remote host closed the connection]
dsmythe has joined #ruby
fphilipe has joined #ruby
MuffinPimp has quit [Quit: Goodbye.]
MuffinPimp has joined #ruby
orbyt_ has joined #ruby
fphilipe has quit [Ping timeout: 246 seconds]
jelera has quit [Read error: Connection reset by peer]
dsmythe_ has joined #ruby
dsmythe has quit [Ping timeout: 245 seconds]
duderonomy has joined #ruby
Inline has quit [Ping timeout: 264 seconds]
jmcgnh has joined #ruby
Swyper has joined #ruby
jmcgnh has quit [Client Quit]
Swyper has quit [Ping timeout: 250 seconds]
ramfjord_ has quit [Ping timeout: 268 seconds]
skryking_ has quit [Ping timeout: 250 seconds]
skryking has joined #ruby
ramfjord has joined #ruby
ramfjord has quit [Ping timeout: 246 seconds]
marmotini_ has joined #ruby
Inline has joined #ruby
FastJack has quit [Ping timeout: 264 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Hobbyboy has quit [Ping timeout: 268 seconds]
marmotini_ has quit [Ping timeout: 258 seconds]
jenrzzz has quit [Ping timeout: 245 seconds]
AJA4350 has quit [Quit: AJA4350]
jmcgnh has joined #ruby
gnufied has quit [Remote host closed the connection]
jmcgnh has quit [Client Quit]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zacts has joined #ruby
braincrash has quit [Quit: bye bye]
dar123 has joined #ruby
braincrash has joined #ruby
ricekrispie2 has joined #ruby
ricekrispie has quit [Ping timeout: 258 seconds]
gix- has joined #ruby
gix has quit [Disconnected by services]
TvL2386 has quit [Ping timeout: 246 seconds]
uranoss has joined #ruby
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TvL2386 has joined #ruby
zEphiRo has joined #ruby
marmotini_ has joined #ruby
jenrzzz has joined #ruby
abaiste^ has quit [Ping timeout: 250 seconds]
abaiste^ has joined #ruby
evdubs has quit [Quit: Leaving]
evdubs has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
jcarl43 has quit [Quit: WeeChat 2.4]
OneNeptune has joined #ruby
FastJack has joined #ruby
OneNeptune has quit [Client Quit]
zacts has quit [Quit: WeeChat 2.4]
dsmythe has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
dsmythe_ has quit [Ping timeout: 276 seconds]
orbyt_ has quit [Quit: Textual IRC Client: www.textualapp.com]
Tempesta has joined #ruby
laaron has quit [Remote host closed the connection]
zacts has joined #ruby
laaron has joined #ruby
druonysus has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
dar123 has joined #ruby
ramfjord has joined #ruby
jcarl43 has joined #ruby
ramfjord has quit [Ping timeout: 268 seconds]
dsmythe has quit [Ping timeout: 250 seconds]
sauvin has joined #ruby
reber has joined #ruby
Swyper has joined #ruby
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
reber has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 250 seconds]
ricekrispie has joined #ruby
ricekrispie2 has quit [Ping timeout: 250 seconds]
uranoss has quit [Quit: Connection closed for inactivity]
duderonomy has joined #ruby
jenrzzz has joined #ruby
m_antis has quit [Quit: m_antis]
lel has quit [Ping timeout: 245 seconds]
dsmythe has joined #ruby
Swyper has quit [Remote host closed the connection]
dellavg_ has joined #ruby
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
fphilipe has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
Yxhuvud has quit [Ping timeout: 250 seconds]
Yxhuvud has joined #ruby
houhoulis has quit [Remote host closed the connection]
alem0lars has joined #ruby
ramfjord has joined #ruby
Davey has joined #ruby
Davey has quit [Changing host]
Davey has joined #ruby
jenrzzz has joined #ruby
ricekrispie2 has joined #ruby
ricekrispie has quit [Ping timeout: 258 seconds]
wildermind has joined #ruby
zEphiRo has quit [Quit: zEphiRo]
lel has joined #ruby
lxsameer has joined #ruby
jcarl43 has quit [Quit: WeeChat 2.4]
nowhere_man has joined #ruby
dsmythe has quit [Ping timeout: 258 seconds]
suukim has joined #ruby
harmaahylje has left #ruby [#ruby]
ramfjord has quit [Ping timeout: 245 seconds]
mikecmpbll has joined #ruby
alem0lars has quit [Remote host closed the connection]
buckworst has joined #ruby
hightower3 has joined #ruby
buckworst has quit [Quit: Leaving]
waheedi has joined #ruby
alem0lars has joined #ruby
reber has joined #ruby
ua has quit [Ping timeout: 245 seconds]
conta has joined #ruby
mikecmpbll has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
fphilipe has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Ping timeout: 245 seconds]
jenrzzz has joined #ruby
marmotini has joined #ruby
hightower3 has quit [Ping timeout: 258 seconds]
waheedi has quit [Quit: waheedi]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
ur5us has quit [Ping timeout: 258 seconds]
fphilipe has joined #ruby
reber has quit [Remote host closed the connection]
wildermind has quit [Quit: Connection closed for inactivity]
dsmythe has joined #ruby
m_antis has joined #ruby
sh7d has joined #ruby
fphilipe has quit [Ping timeout: 244 seconds]
mniip has quit [Ping timeout: 610 seconds]
marmotini_ has quit [Quit: Leaving]
mniip has joined #ruby
nowhere_man has quit [Ping timeout: 245 seconds]
fphilipe has joined #ruby
ramfjord has joined #ruby
fphilipe has quit [Ping timeout: 255 seconds]
<flips> Heh, dashboard prompted me to install versionupgrade ... But FreePBX 15 is still alpha ... I guess I'll just wait a bit longer ... ;)
ramfjord has quit [Ping timeout: 244 seconds]
<syndikate> Can help me understand what I am missing in this simple unix program?
<syndikate> someone*
<syndikate> I start the programs, takes an input in parent and sends to worker. But in worker I am not able to receive it
<syndikate> It just gets stuck there
evdubs has quit [Ping timeout: 276 seconds]
_whitelogger has joined #ruby
flips has left #ruby ["bbl"]
cd has quit [Quit: cd]
AJA4350 has joined #ruby
<syndikate> Nvm guys, fixed it :D
evdubs has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
jenrzzz has joined #ruby
postmodern has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
Guest14 has joined #ruby
fphilipe has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
Guest14 is now known as altigraph
laaron has joined #ruby
Cthulu201 has quit [Quit: Nowhere special. I always wanted to go there.]
Cthulu201 has joined #ruby
Jonopoly has joined #ruby
fphilipe has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
marmotini has quit [Ping timeout: 258 seconds]
kyrylo has joined #ruby
hightower3 has joined #ruby
alem0lars has quit [Ping timeout: 258 seconds]
bmurt has joined #ruby
Dbugger has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
altigraph has quit [Remote host closed the connection]
Guest14 has joined #ruby
segy has quit [Ping timeout: 255 seconds]
Guest14 has quit [Remote host closed the connection]
altigraph has joined #ruby
marmotini_ has joined #ruby
alem0lars has joined #ruby
Fernando-Basso has joined #ruby
laaron has quit [Remote host closed the connection]
laaron has joined #ruby
waheedi has joined #ruby
Tuor has joined #ruby
laaron has quit [Remote host closed the connection]
laaron has joined #ruby
conspyone has joined #ruby
fphilipe has joined #ruby
segy has joined #ruby
buckworst has joined #ruby
buckworst has quit [Client Quit]
conspyone has quit [Remote host closed the connection]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aither has quit [Quit: ZNC 1.7.1 - https://znc.in]
aither has joined #ruby
bmurt has joined #ruby
Tuor has quit [Quit: Konversation terminated!]
dsmythe has quit [Remote host closed the connection]
altigraph has quit [Ping timeout: 268 seconds]
dsmythe has joined #ruby
zacts has quit [Quit: WeeChat 2.4]
fphilipe has quit [Ping timeout: 268 seconds]
zacts has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lucasb has joined #ruby
pupsikov has joined #ruby
weird_error has quit [Quit: weird_error]
ua has joined #ruby
jenrzzz has joined #ruby
fphilipe has joined #ruby
OneNeptune has joined #ruby
pwnd_nsfw has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 245 seconds]
zacts has quit [Ping timeout: 258 seconds]
waheedi has quit [Quit: waheedi]
zacts has joined #ruby
fphilipe has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 246 seconds]
zacts has quit [Client Quit]
zacts has joined #ruby
violentE has quit [Ping timeout: 250 seconds]
Rakete1111 has joined #ruby
<Rakete1111> hello all. I'm a ruby beginner and I'm trying to resolve an issue I've been having with the mail gem. Can someone please try to reproduce my problem, as that would be really helpful to see if it is not a problem with my environment or not.
SeepingN has joined #ruby
<Rakete1111> seems to be an encoding problem somewhere inside mail where parts of the email are not recognized
<Rakete1111> I patched my version of mail by forcing conversion to UTF-8 and that works, but the non-ascii characters are dropped, as expected
OneNeptune has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
houhoulis has joined #ruby
thebigj has left #ruby [#ruby]
skryking_ has joined #ruby
bmurt has joined #ruby
skryking has quit [Ping timeout: 245 seconds]
<adam12> Rakete1111: Did we talk about this a few days ago? I'm having deja-vu
fphilipe has joined #ruby
alem0lars has quit [Ping timeout: 245 seconds]
<Rakete1111> adam12: yes :)
<Rakete1111> you're right
<adam12> Rakete1111: I reproduced your issue. With characters the result is nil. Without the characters, I get a Mail::Part object back.
<Rakete1111> thank you, that helps
<adam12> LANG=en_US.UTF-8
<adam12> LC_CTYPE="en_US.UTF-8"
<adam12> LC_COLLATE=C
<Rakete1111> that is interesting though, because I would have thought that the content of the body is irrelevent when parsing the email
<Rakete1111> well my LANG is the same
<Rakete1111> take this: header_part, body_part = raw_source.encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: '').lstrip.split(HEADER_SEPARATOR, 2)
<Rakete1111> without the "invalid" characters, this fails
<Rakete1111> but I read the email with :encoding => "UTF-8"
<Rakete1111> so it should be valid UTF8
<adam12> Rakete1111: I can't look at it now but since you've provided an example email I'll dig into it a bit later and see if there's something I can see.
<Rakete1111> ok thanks
<Rakete1111> I'll continue looking
conta has quit [Quit: conta]
zacts has quit [Quit: WeeChat 2.4]
bmurt has quit [Quit: Textual IRC Client: www.textualapp.com]
wget has quit [Remote host closed the connection]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
polishdub has joined #ruby
hiroaki has joined #ruby
zacts has joined #ruby
Rakete1121 has joined #ruby
wget has joined #ruby
wget has quit [Changing host]
wget has joined #ruby
Rakete1121 has left #ruby [#ruby]
Rakete1111 has quit [Ping timeout: 258 seconds]
Rakete1111 has joined #ruby
zacts has quit [Ping timeout: 244 seconds]
zacts has joined #ruby
fphilipe has quit [Ping timeout: 246 seconds]
zacts_pi has joined #ruby
wget has quit [Quit: kill -3 wget]
zacts is now known as Guest19553
zacts_pi is now known as zacts
Guest19553 has quit [Ping timeout: 244 seconds]
VSpike has joined #ruby
Swyper has joined #ruby
alem0lars has joined #ruby
OneNeptune has joined #ruby
<VSpike> Hi. How much of a problem is it to use a older version of a supported branch in production. e.g for 2.4.x, should anything less than 2.4.6 be considered deprecated?
<VSpike> Is it any worse or better than using a 2.3.x version, for example?
hightower3 has quit [Ping timeout: 245 seconds]
<VSpike> Are there scales of wrongness, where 2.4.0 is awful (2.5 years old!) but 2.4.5 is meh?
Swyper has quit [Remote host closed the connection]
ramfjord has joined #ruby
<adam12> VSpike: If you have to run a non-current version, you're obviously best to run the latest of that minor. The patches will usually switch from bug fixes to security fixes.
<adam12> VSpike: I don't think there's any hard and fast rule, and you could look at 2.4.6 and 2.4.5 and go meh, 2.4.5 is sufficient.
Swyper has joined #ruby
wald0 has joined #ruby
<Rakete1111> What
ramfjord has quit [Ping timeout: 244 seconds]
<Rakete1111> oops
<Rakete1111> ignore me lol :)
jenrzzz has joined #ruby
Jonopoly has quit [Quit: WeeChat 2.4]
Swyper has quit [Remote host closed the connection]
cthu| has quit [Ping timeout: 246 seconds]
cthulchu has joined #ruby
lxsameer has quit [Ping timeout: 245 seconds]
houhoulis has quit [Ping timeout: 246 seconds]
houhoulis has joined #ruby
krawchyk has joined #ruby
zacts has quit [Quit: WeeChat 2.4]
sean_s has joined #ruby
jcarl43 has joined #ruby
ramfjord has joined #ruby
sean_s has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 245 seconds]
Ltem has joined #ruby
houhouli_ has joined #ruby
houhoulis has quit [Ping timeout: 245 seconds]
Fernando-Basso has quit [Remote host closed the connection]
wget has joined #ruby
wget has quit [Client Quit]
duderonomy has joined #ruby
AJA4351 has joined #ruby
fphilipe has joined #ruby
wget has joined #ruby
AJA4350 has quit [Ping timeout: 255 seconds]
AJA4351 is now known as AJA4350
zacts has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
<Eiam> heh im still deploying some projects on 2.1
<Eiam> fire and forget
<Eiam> =)
Ltem has quit [Ping timeout: 244 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
OneNeptune has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
m_antis has quit [Read error: Connection reset by peer]
hiroaki has quit [Remote host closed the connection]
pupsikov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
spiette has quit [Quit: ZNC 1.7.3 - https://znc.in]
hiroaki has joined #ruby
m_antis has joined #ruby
yokel has quit [Read error: Connection reset by peer]
yokel has joined #ruby
reber has joined #ruby
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #ruby
hiroaki has quit [Remote host closed the connection]
zacts has quit [Quit: WeeChat 2.4]
hiroaki has joined #ruby
pupsikov has joined #ruby
ramfjord has joined #ruby
OneNeptune has joined #ruby
OneNeptune has quit [Client Quit]
OneNeptune has joined #ruby
sgen has joined #ruby
sameerynho has joined #ruby
ramfjord has quit [Ping timeout: 250 seconds]
ramfjord has joined #ruby
hiroaki has quit [Remote host closed the connection]
fphilipe has quit [Ping timeout: 276 seconds]
hiroaki has joined #ruby
<adam12> 2.6 has such goodness tho
mikecmpbll has joined #ruby
sauvin has quit [Read error: Connection reset by peer]
sgen has quit [Ping timeout: 276 seconds]
hiroaki has quit [Remote host closed the connection]
hiroaki has joined #ruby
jenrzzz has joined #ruby
suukim has quit [Quit: Konversation terminated!]
agent_white has joined #ruby
hiroaki has quit [Ping timeout: 268 seconds]
cd has joined #ruby
speakingcode has joined #ruby
ljarvis__ has quit [Quit: WeeChat 2.4]
clemens3_ has joined #ruby
hiroaki has joined #ruby
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
GodFather has quit [Remote host closed the connection]
laaron has joined #ruby
fishcooker has joined #ruby
<fishcooker> im trying to install the ruby here but problem to signature problem vpaste.net/nr4ku
fishcooker has left #ruby [#ruby]
<ule> Do you guys know if there is a method that transform this: {a:1}to: { [{a:1},{a:1},{a:1}] }
<ule> ?
<ule> I'm not sure how to search by that. Clone? Multiply? Duplicate hash?
dellavg_ has quit [Ping timeout: 250 seconds]
<phaul> &>> [{a: 1}] * 3
<rubydoc> # => [{:a=>1}, {:a=>1}, {:a=>1}] (https://carc.in/#/r/6tiq)
AJA4351 has joined #ruby
<ule> phaul: dammit. The simples solution ever that I didn't even think about it. :P
<ule> Thank you very much!
<phaul> but with this kind of stuff you always have to be careful of what's deep cloned and whats the same object multiple times
<phaul> np
AJA4350 has quit [Ping timeout: 250 seconds]
AJA4351 is now known as AJA4350
fishcooker has joined #ruby
<fishcooker> sorry im disconnected im trying to install the ruby here but problem to signature problem vpaste.net/nr4ku
hiroaki has quit [Remote host closed the connection]
krawchyk has quit [Quit: krawchyk]
<phaul> no idea fishcooker sorry. Have you tried following the instructions in the error message?
hiroaki has joined #ruby
tdy1 has quit [Ping timeout: 258 seconds]
ramfjord has quit [Ping timeout: 250 seconds]
<phaul> &>> &>> x = [{a:1}] * 3; x[0][:b] = 2; x # ule
<rubydoc> stderr: -e:2: syntax error, unexpected & (https://carc.in/#/r/6tjy)
<phaul> &>> x = [{a:1}] * 3; x[0][:b] = 2; x # ule
<rubydoc> # => [{:a=>1, :b=>2}, {:a=>1, :b=>2}, {:a=>1, :b=>2}] (https://carc.in/#/r/6tjz)
hiroaki has quit [Remote host closed the connection]
hiroaki has joined #ruby
<ule> sweet
<ule> phaul: I'm working here to generate some dummy data through an API. If a specific parameter is set, the response will return some dummy data
<ule> That will be really handy
<phaul> &>> x = Array.new(3) { {a:1} }; x[0][:b] = 2; x
<rubydoc> # => [{:a=>1, :b=>2}, {:a=>1}, {:a=>1}] (https://carc.in/#/r/6tkc)
jenrzzz has quit [Ping timeout: 246 seconds]
<phaul> so just know the difference of these ^ two. as it can be really hard to debug if an object is referenced from multiple places of a program.
<phaul> multiple data structures rather
fphilipe has joined #ruby
sgen has joined #ruby
<ule> phaul: For most of the endpoints, I'm gonna generate seeds with dummy data.. but for some endpoints that basically returns data from external data sources, I'm intercepting and "injecting" this dummy response
<ule> First time doing this kind of stuff. I'm kind of following my guts so far.. :/
<ule> But always with something telling me that this is a kind of code smell :D
_joes_ has joined #ruby
alem0lars has quit [Ping timeout: 258 seconds]
<phaul> so in [a] * n you get an array of one *single* object n times, whereas Array.new(n) { a } gives an array of n objects each of wich initially equal to a. that's the main gotcha with this
<fishcooker> checking... phaul
wallace_mu has joined #ruby
_joes_ has quit [Read error: Connection reset by peer]
_joes_ has joined #ruby
tdy1 has joined #ruby
spiette has joined #ruby
tdy1 is now known as tdy
SeepingN has quit [Ping timeout: 245 seconds]
<fishcooker> phaul: i have done with the curl commands but still https://dpaste.de/o6fO
<fishcooker> but i think the rvm still not installed
<phaul> hopefully someone with RVM knowledge comes along...
nowhere_man has joined #ruby
hiroaki has quit [Remote host closed the connection]
hiroaki has joined #ruby
<fishcooker> rvm is ruby version manager
ramfjord has joined #ruby
<fishcooker> how about installing not stable one phaul?
dsmythe has quit [Remote host closed the connection]
dsmythe has joined #ruby
<zenspider> rawr
<phaul> zenspider: rvm. we need you ! :)
<zenspider> I don't use rvm, but I might be able to answer questions
jenrzzz has joined #ruby
<zenspider> what's up?
<zenspider> the dpaste?
<phaul> yeah.
nowhere_man has quit [Ping timeout: 258 seconds]
tdy has quit [Ping timeout: 246 seconds]
<zenspider> I see some stuff about gpg. *shrug* Do the thing it says?
<zenspider> or use rbenv. This is not a problem I have or want to have.
fphilipe has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 245 seconds]
fphilipe has joined #ruby
<zenspider> it looks like fishcooker is pretty unresponsive... so... yeah.
jenrzzz has joined #ruby
OneNeptune has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sgen has quit [Ping timeout: 276 seconds]
_joes_ has quit [Remote host closed the connection]
_joes_ has joined #ruby
wald0 has quit [Quit: Lost terminal]
krawchyk has joined #ruby
fphilipe has quit [Ping timeout: 250 seconds]
dinfuehr_ has joined #ruby
_joes_ has quit [Quit: _joes_]
dinfuehr has quit [Ping timeout: 246 seconds]
_joes_ has joined #ruby
Dbugger has quit [Quit: Leaving]
fphilipe has joined #ruby
OneNeptune has joined #ruby
ur5us has joined #ruby
SeepingN has joined #ruby
hightower3 has joined #ruby
hightower3 has quit [Changing host]
hightower3 has joined #ruby
tdy has joined #ruby
abaiste^ has quit [Read error: Connection reset by peer]
cjohnson has joined #ruby
<cjohnson> Is there a method that returns the first *return value* of the given block that isn't false or nil or something?
cnsvc has joined #ruby
<cjohnson> Basically I have a list of values, I want to do a transform on the value but I want to stop at the first return that matches a condition
<cjohnson> A list of secret objects, and I want to call authenticator.authenticate(secret) against each secret, and stop checking additional secrets after I find one where authenticator.authenticate doesn't return false
<cjohnson> I can make it return nil or something else if that helps
<adam12> cjohnson: Like Enumerable#find ?
<cjohnson> Yes except that find returns the original value
<cjohnson> I want to return the transformed value
speakingcode has quit [Ping timeout: 246 seconds]
<cjohnson> I might have to write *gasp* a loop
<cjohnson> with a break
<cjohnson> Oh wait you can break in find and it'll return the break
tdy1 has joined #ruby
tdy has quit [Ping timeout: 246 seconds]
OneNeptune has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<cjohnson> nice that's exactly what I needed
<cjohnson> p.find do |i|
<cjohnson> break transformed_value if i.condition
<cjohnson> end
<phaul> how about p.map(&:transform_value).find(&:condition)
<phaul> ah. that checks condition on the mapped values
_joes_ has quit [Quit: _joes_]
<phaul> p.find(&:condition)&.then(&:transform_value) ?
hiroaki has quit [Quit: Leaving]
<phaul> &>> [1,2,3].find(&:even?)&.then { |x| x + 17 }
<rubydoc> # => 19 (https://carc.in/#/r/6tlx)
kyrylo_ has joined #ruby
kyrylo has quit [Ping timeout: 246 seconds]
reber has quit [Remote host closed the connection]
tdy1 is now known as tdy
jenrzzz has quit [Ping timeout: 250 seconds]
marmotini_ has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
<VSpike> adam12: right, makes sense. But anything other than the latest release on the non-current series is going to have security flaws pretty much by definition
<VSpike> And the older it is, the more flaws it will have, presumably
wallace_mu has quit []
houhouli_ has quit [Ping timeout: 258 seconds]
fphilipe has quit [Ping timeout: 276 seconds]
houhoulis has joined #ruby
_joes_ has joined #ruby
dsmythe has quit [Remote host closed the connection]
dsmythe has joined #ruby
polishdub has quit [Quit: leaving]
jenrzzz has quit [Ping timeout: 245 seconds]
d^sh has quit [Ping timeout: 246 seconds]
zacts has joined #ruby
sgen has joined #ruby
d^sh has joined #ruby
_joes_ has quit [Quit: _joes_]
_joes_ has joined #ruby
_joes_ has quit [Quit: _joes_]
SeepingN_ has joined #ruby
SeepingN has quit [Disconnected by services]
jenrzzz has joined #ruby
fphilipe has joined #ruby
SeepingN has joined #ruby
tdy has quit [Ping timeout: 258 seconds]
SeepingN_ has quit [Ping timeout: 246 seconds]
OneNeptune has joined #ruby
_Caerus has quit [Ping timeout: 245 seconds]
Ltem has joined #ruby
dsmythe has quit [Remote host closed the connection]
Swyper has joined #ruby
speakingcode has joined #ruby
dsmythe has joined #ruby
<cjohnson> phaul: the condition is on the transformed value
<cjohnson> and also that doesn't stop checking after the first match
Caerus has joined #ruby
brendan- has quit [Ping timeout: 250 seconds]
Swyper has quit [Remote host closed the connection]
hightower2 has joined #ruby
Swyper has joined #ruby
hightower3 has quit [Ping timeout: 245 seconds]
Swyper has quit [Remote host closed the connection]
clemens3_ has quit [Ping timeout: 246 seconds]
clemens3 has joined #ruby
eduardo has joined #ruby
Ltem has quit [Quit: bye]
zacts has quit [Quit: WeeChat 2.4]
mikecmpbll has quit [Quit: inabit. zz.]
Swyper has joined #ruby
eduardo is now known as phantom
phantom is now known as edual
fphilipe has quit [Ping timeout: 276 seconds]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
galaxie has quit [Ping timeout: 256 seconds]
galaxie has joined #ruby
brendan- has joined #ruby
endorama has joined #ruby
Swyper has quit [Remote host closed the connection]
weird_error has joined #ruby
al2o3-cr has quit [Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.]
lunarkitty7 has quit [Quit: WeeChat 1.9.1]
houhoulis has quit [Ping timeout: 246 seconds]
al2o3-cr has joined #ruby
xco has joined #ruby
<xco> Hi. I want to build my first gem. However I’m not sure if there’s anything special I need to do if I need my gem to be able to be used in Rails at the same time.
fishcooker has quit [Quit: Leaving.]
hightower2 has quit [Ping timeout: 245 seconds]
<xco> Question is if i build a generic gem for Ruby, is there anything extra I would do to make it useable in Rails; asking because the gem i want to build will use some API keys
<xco> in a Rails app you’d put this keys in say config/intializers/mygem.rb
<xco> but you won’t do this for a normal generic gem
<xco> how do i go about achieving this? building a gem that you can use with and without Rails?
xco has quit [Quit: xco]
grvgr has joined #ruby
laaron has quit [Remote host closed the connection]
laaron has joined #ruby
pupsikov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]