s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dbz has joined #ruby
orbyt_ has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dbz has quit [Ping timeout: 244 seconds]
za1b1tsu has quit [Ping timeout: 244 seconds]
dbz has joined #ruby
savolla has quit [Quit: Lost terminal]
duderonomy has joined #ruby
pskosinski_ has joined #ruby
pskosinski is now known as Guest93121
pskosinski_ is now known as pskosinski
Guest93121 has quit [Read error: Connection reset by peer]
duderonomy has quit [Client Quit]
dbz has quit [Ping timeout: 252 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
za1b1tsu has joined #ruby
aniarya82 has joined #ruby
dbz has joined #ruby
s2013 has joined #ruby
herbert_cyborg has quit [Quit: WeeChat 2.2]
dbz has quit [Ping timeout: 272 seconds]
P1RATEZ has quit []
doubledup has joined #ruby
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
duderonomy has joined #ruby
sauvin has joined #ruby
lomex has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
MoritaShinobu has joined #ruby
apeiros has quit [Remote host closed the connection]
ascarter has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ascarter has quit [Client Quit]
ascarter has joined #ruby
ascarter has quit [Client Quit]
doubledup has quit [Quit: Leaving]
mike11 has joined #ruby
ascarter has joined #ruby
ascarter has quit [Client Quit]
ascarter has joined #ruby
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ascarter has quit [Client Quit]
s2013 has joined #ruby
ascarter has joined #ruby
ascarter has quit [Client Quit]
ascarter has joined #ruby
ascarter has quit [Client Quit]
ascarter has joined #ruby
ascarter has quit [Client Quit]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ascarter has joined #ruby
ascarter has quit [Client Quit]
ascarter has joined #ruby
arup_r has joined #ruby
ascarter has quit [Client Quit]
ascarter has joined #ruby
ascarter has quit [Client Quit]
Nicmavr has quit [Read error: Connection reset by peer]
snickers has joined #ruby
Nicmavr has joined #ruby
fran__ has joined #ruby
Fr4n has quit [Read error: Connection reset by peer]
ascarter has joined #ruby
aufi has joined #ruby
ascarter has quit [Client Quit]
ascarter has joined #ruby
ascarter has quit [Client Quit]
ascarter has joined #ruby
ascarter has quit [Client Quit]
ascarter has joined #ruby
ascarter has quit [Client Quit]
ascarter has joined #ruby
ascarter has quit [Client Quit]
nickjj_ has joined #ruby
nickjj has quit [Ping timeout: 252 seconds]
venmx has quit [Ping timeout: 246 seconds]
moei has quit [Ping timeout: 252 seconds]
aufi has quit [Ping timeout: 240 seconds]
arup_r has quit []
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
dbz has joined #ruby
beefjoe has joined #ruby
Dbugger has joined #ruby
dbz has quit [Ping timeout: 252 seconds]
Dbugger has quit [Remote host closed the connection]
aniarya82 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
m27frogy has quit [Ping timeout: 252 seconds]
stoffus has joined #ruby
clemens3 has joined #ruby
beefjoe has quit [Quit: <3]
marz_d`ghostman has joined #ruby
<marz_d`ghostman>
I have a method that calls %x. I'm currently testing it to make sure it doesn't throw any Exception when that %x succeeds, or expect and Exception when it fails. How do I stub %x?
beefjoe has joined #ruby
<universa1>
marz_d`ghostman: expect(some_object).to receive(:%x).and_return(true) ?! a little bit more context would help
johnny56 has quit [Ping timeout: 272 seconds]
aniarya82 has joined #ruby
<universa1>
marz_d`ghostman: ignore the first part
comet23 has quit [Quit: Connection closed for inactivity]
<universa1>
marz_d`ghostman: not sure how to stub those "special syntax methods", did you try to just stub :%x on the object / instance you are testing?
graphene has quit [Remote host closed the connection]
<universa1>
marz_d`ghostman: because that is then not set!
<marz_d`ghostman>
universa1: Oh, I see
<marz_d`ghostman>
I thought the return(0) would take care of that
<universa1>
marz_d`ghostman: no, that is the return value of %x(...
<universa1>
marz_d`ghostman: but as a side effect %x normally sets $?
<marz_d`ghostman>
universa1: any thoughts on how to test the method? :)
<universa1>
marz_d`ghostman: i guess I would create two dummy scripts, one successfull and one returning a different exitstatus and call those and not stub anythings...
aniarya82 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<universa1>
marz_d`ghostman: or replace the magic with an explicit form using Open3.popen
<universa1>
marz_d`ghostman: the raise CmdError.new(e.message) will also fail most likely ;)
<marz_d`ghostman>
I'll take a look at it
<marz_d`ghostman>
universa1: thanks
<universa1>
marz_d`ghostman: or you could just call: 'true' and 'false' as your custom scripts ;) at least on a unix machine
mike11 has quit [Read error: Connection reset by peer]
blackmes1 has joined #ruby
reber__ has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
blackmesa has joined #ruby
reber has quit [Ping timeout: 240 seconds]
blackmesa1 has quit [Ping timeout: 252 seconds]
madhatter has quit [Quit: leaving]
madhatter has joined #ruby
blackmes1 has quit [Ping timeout: 252 seconds]
blackmesa1 has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
mgraf has joined #ruby
mgraf has left #ruby [#ruby]
blackmesa has joined #ruby
Miron_ has joined #ruby
mgraf has joined #ruby
xfbs has joined #ruby
blackmesa1 has quit [Ping timeout: 252 seconds]
blackmesa1 has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
blackmesa has joined #ruby
blackmesa1 has quit [Ping timeout: 252 seconds]
blackmes1 has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
bmurt has joined #ruby
apeiros has joined #ruby
mgraf has quit [Ping timeout: 240 seconds]
GodFather has quit [Ping timeout: 252 seconds]
cyberRodent has quit [Ping timeout: 252 seconds]
blackmes1 has quit [Ping timeout: 250 seconds]
hays_ has joined #ruby
hays_ has left #ruby [#ruby]
cyberRodent has joined #ruby
xfbs has quit [Quit: afk]
mgraf has joined #ruby
xfbs has joined #ruby
marmotini_ has joined #ruby
<za1b1tsu_>
anyone knows how add completion to options with optparse? I press -TAB put nothing shows up. In the documentation it simply says: "For modern shells (e.g. bash, zsh, etc.), you can use shell completion for command line options."
marmotini_ has quit [Read error: Connection reset by peer]
troys has joined #ruby
agent_white has quit [Quit: bbl]
mikecmpbll has quit [Quit: inabit. zz.]
DLSteve has joined #ruby
wojnar has quit [Remote host closed the connection]
<mgraf>
Favorite uses of `.inject` ?
wojnar has joined #ruby
apparition has quit [Quit: Bye]
mikecmpbll has joined #ruby
<za1b1tsu_>
ahh nevermind, I need to learn how shell functions
<ruby[bot]>
Gestahlt: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<Gestahlt>
I dont want to trigger the validations when there is no matching element on both sides
<Gestahlt>
ah i see.. next is interesting. But what about the if around the loop?
graphene has quit [Remote host closed the connection]
<mgraf>
It depends what you want to do, really. That `if` is fine. Without context it's hard to understand further...
graphene has joined #ruby
<Gestahlt>
well, i compare if both hashes contain the same key, if so, i loop over the keys of the event hash, and if i have a configuration for this event, i validate the config
ellcs has joined #ruby
Creatornator has joined #ruby
<mgraf>
traditionally, ruby should read like English. So, you could create a (private) method that would clean it up a little further, if you're interested in removing the && from the first line.
chouhoulis has joined #ruby
<mgraf>
It also depends on the ruby version you're using. You could use dig in the @event hash, and remove the first line entirely
Creatornator has quit [Client Quit]
mgraf has quit [Ping timeout: 252 seconds]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
k0mpa has joined #ruby
ivanskie has joined #ruby
mgraf has joined #ruby
knight33 has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
cd has quit [Quit: cd]
lanky_leguan has joined #ruby
ascarter has joined #ruby
mgraf has quit [Ping timeout: 252 seconds]
MoritaShinobu has quit [Quit: Leaving]
clemens3 has quit [Ping timeout: 250 seconds]
lanky_leguan has quit [Quit: Page closed]
graphene has quit [Remote host closed the connection]
soniya29 has joined #ruby
graphene has joined #ruby
beowuff has joined #ruby
darkhanb has joined #ruby
hogetaro has quit [Quit: Leaving...]
lxsameer has quit [Ping timeout: 240 seconds]
jottr has quit [Ping timeout: 252 seconds]
millerti has joined #ruby
DTZUZO has quit [Ping timeout: 245 seconds]
tdy has joined #ruby
orbyt_ has joined #ruby
soniya29 has quit [Quit: Leaving]
quazimodo has quit [Ping timeout: 272 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ellcs has quit [Ping timeout: 260 seconds]
tdy has quit [Ping timeout: 272 seconds]
Creatornator has joined #ruby
weaksauce has joined #ruby
tdy has joined #ruby
xfbs has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
Puffball has quit [Remote host closed the connection]
sameerynho has joined #ruby
doubledup has joined #ruby
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xfbs has quit [Quit: byebye]
doubledup has quit [Quit: Leaving]
nogic has joined #ruby
venmx has quit [Ping timeout: 252 seconds]
t0adst00l has quit [Ping timeout: 256 seconds]
jottr has joined #ruby
ua_ has quit [Ping timeout: 245 seconds]
desperek has joined #ruby
Puffball has joined #ruby
ascarter_ has joined #ruby
ascarter has quit [Ping timeout: 250 seconds]
IanMalcolm has joined #ruby
mikecmpbll has joined #ruby
ua_ has joined #ruby
wildermind has quit [Quit: Connection closed for inactivity]
clemens3 has joined #ruby
roshanavand has joined #ruby
nofxx has joined #ruby
sauvin has quit [Read error: Connection reset by peer]
madhatter has quit [Quit: leaving]
sgen has joined #ruby
madhatter has joined #ruby
ShekharReddy has joined #ruby
quintasan has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
graphene has quit [Remote host closed the connection]
ascarter has joined #ruby
graphene has joined #ruby
ascarter_ has quit [Ping timeout: 250 seconds]
dbugger_ has joined #ruby
SeepingN has joined #ruby
blackmes1 has joined #ruby
sgen has quit [Remote host closed the connection]
Creatornator has joined #ruby
Gestahlt has quit [Remote host closed the connection]
IanMalcolm has quit [Ping timeout: 252 seconds]
fran__ has quit [Read error: Connection reset by peer]
Fr4n has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ziggylazer has quit [Excess Flood]
Fr4n has quit [Quit: Fr4n]
ziggylazer has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
duderonomy has joined #ruby
<ogotai>
havenwood: I'm using httpclient already, I suppose all I'm trying to do is use HTTPS and SNI, but the actual TCP connection is tunnelled and therefore the IP/name is different than what should be requested via SNI once connected
<ogotai>
specifically, it's a Virtualbox VM, and I port forward 443/tcp to 127.0.0.1 from guest to host, and code connects to 127.0.0.1:443, but should GET "https://fqdn/path", instead of "https://127.0.0.1/path"
<ogotai>
so was wondering if anyone had experience with httpclient gem specifically and knows how to set connection and SNI details separately
<ogotai>
in a way I don't want it to resolve anything, just connect to IP:port, then use specific SNI server name
venmx has joined #ruby
darix has quit [Quit: may the packets be with you...]
skwurl has joined #ruby
<skwurl>
hello anyone!
<skwurl>
noob troubles. trying to retrive a string from inside a method to use globally. been skimming through docs for a while to no avail, yet. any insight?