<phaul>
I briefly looked at this 8 hours ago when you asked .. the second time? It points to twitter post with a gist of some code where. On that gist like 30 ppl complained about similar issues that you are experiencing. What do you expect?
cagomez has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rfoust has joined #ruby
rshetty has quit [Ping timeout: 240 seconds]
duderonomy has joined #ruby
<baweaver>
phaul: third or fourth time if I remember right.
<baweaver>
donofrio: you should contact the author of the script on their gist.
tomphp has quit [Ping timeout: 268 seconds]
duderonomy has quit [Client Quit]
tolerablyjake has joined #ruby
<donofrio>
understood, was hoping someone had time to take a look and see if I missed a step
cagomez has quit [Ping timeout: 256 seconds]
iceden has joined #ruby
kn-928 has joined #ruby
John_Ivan has quit [Ping timeout: 260 seconds]
tomphp has joined #ruby
netherwolfe has joined #ruby
yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
yxhuvud has joined #ruby
jyaworski has joined #ruby
netherwolfe has quit [Ping timeout: 260 seconds]
John_Ivan has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
imode1 has joined #ruby
dinfuehr has quit [Ping timeout: 256 seconds]
dinfuehr has joined #ruby
John_Ivan has quit [Ping timeout: 256 seconds]
jyaworski has quit [Ping timeout: 268 seconds]
tomphp has quit [Read error: Connection reset by peer]
shinnya has quit [Ping timeout: 256 seconds]
nowhereman_ has quit [Read error: Connection reset by peer]
nowhere_man has joined #ruby
c0ncealed has quit [Remote host closed the connection]
icarus has joined #ruby
c0ncealed has joined #ruby
kn-928 has quit [Ping timeout: 264 seconds]
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
phaul has quit [Ping timeout: 240 seconds]
cdg has joined #ruby
Zaab1t has quit [Quit: Zaab1t]
physicist__ has quit [Quit: adios freebsd powerpc64!]
EvanR has left #ruby [#ruby]
cdg has quit [Ping timeout: 260 seconds]
phaul has joined #ruby
dr3w_ has joined #ruby
AJA4350 has quit [Quit: AJA4350]
tolerablyjake has joined #ruby
al2o3-cr has quit [Quit: WeeChat 2.1]
gr33n7007h has joined #ruby
gr33n7007h is now known as al2o3-cr
darkhanb has joined #ruby
tomphp has quit [Ping timeout: 264 seconds]
rshetty has joined #ruby
solocshaw has joined #ruby
tomphp has joined #ruby
imode1 has quit [Ping timeout: 260 seconds]
silviu has quit [Ping timeout: 264 seconds]
cschneid has quit [Remote host closed the connection]
stairmast0r has quit [Quit: bye]
stairmast0r has joined #ruby
cschneid has joined #ruby
n0m4d1c has joined #ruby
jyaworski has joined #ruby
rexan has joined #ruby
cagomez has joined #ruby
Mosselman has joined #ruby
cschneid has quit [Remote host closed the connection]
cschneid has joined #ruby
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jyaworski has quit [Ping timeout: 240 seconds]
cagomez has quit [Ping timeout: 260 seconds]
Mosselman has quit [Ping timeout: 260 seconds]
rexan has quit [Remote host closed the connection]
cschneid has quit [Remote host closed the connection]
\void has quit [Quit: So long, and thanks for all the fish.]
cschneid has joined #ruby
bmurt has joined #ruby
cyberg has quit [Quit: Leaving]
tomphp has quit [Read error: Connection reset by peer]
erlend has quit [Ping timeout: 256 seconds]
silviu has joined #ruby
erlend has joined #ruby
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ledestin has joined #ruby
erlend has quit [Ping timeout: 268 seconds]
AJA4350 has joined #ruby
erlend has joined #ruby
amar_ has quit [Ping timeout: 248 seconds]
za1b1tsu has quit [Remote host closed the connection]
ledestin has quit [Ping timeout: 264 seconds]
Ishido has quit [Ping timeout: 256 seconds]
tomphp has joined #ruby
ltt has joined #ruby
yaewa has joined #ruby
alfiemax has quit [Remote host closed the connection]
rshetty has quit [Remote host closed the connection]
rshetty has joined #ruby
tomphp has quit [Client Quit]
moei has quit [Ping timeout: 268 seconds]
CrazyEddy has joined #ruby
rshetty has quit [Ping timeout: 276 seconds]
Ishido has joined #ruby
ltt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rshetty has joined #ruby
\void has joined #ruby
shuforov has joined #ruby
jeffreylevesque has joined #ruby
marr has quit [Ping timeout: 276 seconds]
ryzokuken has quit [Quit: Connection closed for inactivity]
rshetty has quit [Remote host closed the connection]
synthroid has joined #ruby
dr3w_ has joined #ruby
<dionysus69>
apeiros: ok thanks :) rvm doesn't have 2.5 in rvm list known
conta has quit [Ping timeout: 264 seconds]
<apeiros>
dionysus69: you can still install it
<dionysus69>
but debian testing has 2.5 so it was weird that system ruby got latest and rvm not :S
shinnya has quit [Ping timeout: 276 seconds]
<apeiros>
i.e. `rvm install ruby-2.5.0` and `rvm install ruby-2.5.1` both work
<dionysus69>
ok, I ll try thanks again xD
Toasttifyrb1 has quit [Remote host closed the connection]
Toasttifyrb1 has joined #ruby
shpoont has joined #ruby
sagax has joined #ruby
Eslam has joined #ruby
<Eslam>
Hi i have a question about Ruby API
<Eslam>
can some help ? !
<sagax>
just question
<apeiros>
Eslam: we won't know whether we can help before you actually asked your question
<apeiros>
?ask
<ruby[bot]>
Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
<Eslam>
thanks :) - it's the first time to use IRC channels i just wanted to see if someone will reply,
<Eslam>
ok, i ust Ruby scripting to automate some Linux tasks, i use gems like zip, cocket, net/ssh, net/ping, etc..
<Eslam>
and i never tried to learn web development such as ruby on rails, but these days there is a new trend which is automating network devices or hosts using API's
jottr_ has joined #ruby
<Eslam>
i've never used api before and when i looked into it i found that i can use it with web sites
<Eslam>
please consier my little experience with scripting, and advice :)
shpoont has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Dimik has joined #ruby
ecuanaso has joined #ruby
JoshS has quit [Quit: Leaving]
JoshS has joined #ruby
amar has joined #ruby
coderphive has joined #ruby
rshetty has joined #ruby
shpoont has joined #ruby
sepp2k1 has joined #ruby
Eslam has quit [Remote host closed the connection]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sepp2k has quit [Ping timeout: 264 seconds]
rshetty has quit [Ping timeout: 240 seconds]
Mosselman has quit [Ping timeout: 260 seconds]
jamesaxl has quit [Read error: Connection reset by peer]
conta has joined #ruby
jamesaxl has joined #ruby
kn-928 has quit [Ping timeout: 276 seconds]
jane_booty_doe has joined #ruby
MarcWeber has quit [Ping timeout: 240 seconds]
schneider has quit [Ping timeout: 240 seconds]
jyaworski has joined #ruby
<jane_booty_doe>
this is supposed to send x-www-form-urlencoded data right `Net::HTTP.post_form(URI.parse('http://localhost:5000/api/v1/endpoint'), {'param1': 'value1'})`
<jane_booty_doe>
why is making api requests so difficult in ruby...
ltt has joined #ruby
<apeiros>
jane_booty_doe: I think so. also there's plenty of gems which either wrap net/http or use their own networking code which provide a simpler interface for specific use cases.
<phaul>
leitz: there are a few stylistic points where you can make your code more rubiesque
<jane_booty_doe>
apeiros, i tried 2 or 3 but am trying Net now because I ran into so many problems
JoshS has quit [Remote host closed the connection]
<phaul>
use post fix if / unless when the body is single line
<jane_booty_doe>
everything works fine w/ curl and postman but idk how to make ruby play nice :(
JoshS has joined #ruby
<phaul>
leitz: use File.open with a block
<jane_booty_doe>
maybe i can get flask to accept form-data instead...
Mosselman has quit [Ping timeout: 256 seconds]
<leitz>
phaul, I haven't figured out how to use a block with File.open when there are two open files. Pointer to sample code?
<phaul>
File.open('onefile) { |first_file_io| File.open('secondfile') { |second_file_io| .. just nest the blocks
<phaul>
more readble with multi line blocks and do syntax than what I wrote
* leitz
go to try phaul 's idea
<phaul>
leitz: also you can just throw "some error" instead of explicitly exiting, that way the exit status also would indicate an error
erlend has quit [Ping timeout: 240 seconds]
conta has quit [Ping timeout: 240 seconds]
jyaworski has quit [Ping timeout: 268 seconds]
erlend has joined #ruby
kliq has quit [Read error: Connection reset by peer]
ellcs has quit [Remote host closed the connection]
shpoont has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<phaul>
yeah, better, also see my comments about post fix if, unless + calling exit()
ryzokuken__ has joined #ruby
kn-928 has joined #ruby
* phaul
wonders if there is a neat FileTranform('file1', 'file2').by_lines {|line| line * } api..
RougeR has quit [Ping timeout: 264 seconds]
<leitz>
phaul, not sure what you mean by 'post fix if /unless'. In the "if hosts.count" bit the "if" triggers an immedaite exit. If it was "unless", wouldn't it have to wrap the rest of the code?
sanscoeu_ has joined #ruby
<phaul>
sorry leitz, Im afk for about ahlf an hour. I'll get back on this
<leitz>
phaul, I'll be here for a while. :)
sanscoeur has quit [Ping timeout: 240 seconds]
orbyt_ has joined #ruby
stormpack_ has joined #ruby
ellcs has joined #ruby
herbmillerjr has joined #ruby
stormpack has quit [Ping timeout: 276 seconds]
sanscoeur has joined #ruby
sanscoeu_ has quit [Ping timeout: 264 seconds]
jrafanie has joined #ruby
synthroid has quit [Remote host closed the connection]
cschneid has joined #ruby
bmurt has joined #ruby
bmurt has quit [Client Quit]
synthroid has joined #ruby
Mosselman has joined #ruby
cschneid has quit [Ping timeout: 264 seconds]
Toasttifyrb1 has quit [Ping timeout: 255 seconds]
<al2o3-cr>
leitz: `abort("need host names.") if hosts.empty?`abort sends string to stderr too.
amar_ has joined #ruby
conta has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has quit [Remote host closed the connection]
schneider has joined #ruby
amar has quit [Ping timeout: 256 seconds]
<apeiros>
Date.today.iso8601
<al2o3-cr>
apeiros: not quite.
<apeiros>
people using anything but iso8601 for date representations should be punished by having to write a hundred times "I shall not use anything but iso8601" on a chalkboard
conta has quit [Ping timeout: 248 seconds]
<apeiros>
I know it's not the same result
kn-928_ has joined #ruby
<apeiros>
I argue it's the better choice :)
<al2o3-cr>
that is the standard to use though.
<al2o3-cr>
me too :)
alfiemax has joined #ruby
kn-928 has quit [Ping timeout: 248 seconds]
shpoont has joined #ruby
<al2o3-cr>
leitz: get a pen ready :P
<al2o3-cr>
or chalk ;)
schneider has quit [Ping timeout: 264 seconds]
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
John_Ivan has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
schneider has joined #ruby
nicesignal has quit [Remote host closed the connection]
<al2o3-cr>
leitz: is this how your host variable should be? "[45.185.48.230]:2222"
<leitz>
apeiros, Date.today.iso8601 doesn't give me the 8 digit string i use for sorting.
<al2o3-cr>
elomatreb: ah, cheers mate.
<leitz>
al2o3-cr's strftime does.
<leitz>
al2o3-cr, the hosts are entered by name or ip. So "forget_hosts genesis 192.168.1.00 fred"
<phaul>
leitz: I'm back, al2o3-cr already said abort() instead of exit(), the other thing was a bit more generic case for using if/unless or even while/until. If the statement body is only a single line and there is no else use the one line post fix notation. That's what I meant
<leitz>
In the known_hosts file the first, by whitespace, "word" is either an IP or a "hostname,IP"
<leitz>
Welcome back phaul!
<havenwood>
leitz: ARGV.empty?
WhereIsMySpoon_ has joined #ruby
WhereIsMySpoon_ has quit [Changing host]
WhereIsMySpoon_ has joined #ruby
<havenwood>
leitz: There are more robust options for Dir.home that can still work when $HOME isn't set, if you care.
<apeiros>
leitz: and what stops you from using a 10 character string for sorting?
jottr_ has joined #ruby
<leitz>
havenwood, I set hosts to use a clearer variable name than ARGV. Though now using the hosts.empty? bit.
<leitz>
apeiros, because everyone else in the group is using the 8 character string.
paraxial has quit [Quit: Ping timeout (120 seconds)]
dinfuehr has quit [Ping timeout: 264 seconds]
paraxial has joined #ruby
m4rCsi has quit [Quit: No Ping reply in 180 seconds.]
bauruine has quit [Ping timeout: 264 seconds]
phage has quit [Ping timeout: 264 seconds]
m4rCsi has joined #ruby
alfiemax has joined #ruby
vircung has quit [Ping timeout: 264 seconds]
dinfuehr has joined #ruby
vircung has joined #ruby
Mosselman has joined #ruby
matti has quit [Ping timeout: 264 seconds]
matti has joined #ruby
matti has joined #ruby
matti has quit [Changing host]
<leitz>
havenwood, the program will be run by the user. What times would $HOME not be set?
phage has joined #ruby
phage has quit [Changing host]
phage has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
bauruine has joined #ruby
rshetty has quit [Remote host closed the connection]
noobineer has joined #ruby
rshetty has joined #ruby
rshetty has quit [Read error: Connection reset by peer]
rshetty has joined #ruby
noobineer has quit [Remote host closed the connection]
noobineer has joined #ruby
lupine has quit [Ping timeout: 240 seconds]
<havenwood>
leitz: It's rare. On Windows $HOME isn't set (though Dir.home should still work, but Etc.getpwuid.dir doesn't).
<havenwood>
leitz: Though looking into it, they fixed the issue in 2.4. :-)
<havenwood>
leitz: In 2.3: ENV.delete 'HOME'; Dir.home #!> ArgumentError: couldn't find HOME environment -- expanding `~'
<leitz>
Works in 2.6. :)
<havenwood>
That's a nice fix too, because the old way was verbose and required Dir and Etc.
<leitz>
Hmm...not sure windows would use the .ssh directory and known hosts. Haven't looked into it. None of the half-dozen or so computers here run Winderz.
<al2o3-cr>
does windows still have minesweep i wounder
<havenwood>
al2o3-cr: Not installed by default. Have ads now. I'd prefer ascii art minesweeping.
<havenwood>
Or at least emoji!
Mosselman has quit [Ping timeout: 256 seconds]
<al2o3-cr>
hehe, yeah would be cool. windows 95 was the last time i used it at school.
<havenwood>
al2o3-cr: The best way to play minesweeper on win is probably: gem install minesweeper-console
<havenwood>
;-P
<al2o3-cr>
sweet, installing it now :)
<havenwood>
(doesn't seem to actually work on my vm)
<al2o3-cr>
yeah it works haha
<havenwood>
oh, they just missed a dep
meadmoon has joined #ruby
<phaul>
it dies here.
<phaul>
undefined method > for NilClass
<havenwood>
phaul: give it an arg for size
<phaul>
ah :)
synstack has quit [Ping timeout: 276 seconds]
<al2o3-cr>
commands don't seem to work
hph^ has joined #ruby
meadmoon has quit [Client Quit]
<leitz>
Sounds like my code...
<al2o3-cr>
leitz: lol ;)
Mosselman has joined #ruby
<havenwood>
We really need a modern, emoji-based implementation.
<havenwood>
The graphics aren't perfect, but working with a mouse. +1
<al2o3-cr>
havenwood: aha i'll try this much better
jaequery has joined #ruby
erlend has quit [Ping timeout: 276 seconds]
erlend has joined #ruby
oleg has joined #ruby
imode1 has joined #ruby
Mosselman has joined #ruby
shuforov has quit [Ping timeout: 268 seconds]
nowhereman_ has quit [Ping timeout: 255 seconds]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<leitz>
I need to close down for a bit. Back after while.
leitz has quit [Quit: Nappy time]
rshetty has quit [Remote host closed the connection]
ldepandis has joined #ruby
Mosselman has quit [Ping timeout: 256 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Mosselman has joined #ruby
jaequery has joined #ruby
lupine has quit [Ping timeout: 255 seconds]
<phaul>
It think it's quite brave to try random gems from the wild, havenwood, al2o3-cr, did you have any sort of protection against anything nasty like rm * in the gem? Well, I didn't...
<phaul>
like docker or something
<havenwood>
(doesn't seem to actually work on my vm)
<havenwood>
phaul: The shoes ones are small enough to quickly read the code.
<havenwood>
phaul: There's nothing malicious.
<havenwood>
phaul: But yeah, nice to use a VM to play with unread code.
ogres has joined #ruby
Mosselman has quit [Ping timeout: 246 seconds]
<mozzarella>
guys
<mozzarella>
open-uri is doing some weird shit
<mozzarella>
it hangs forever
adgtl has joined #ruby
<havenwood>
mozzarella: read_timeout: 42
<phaul>
it can be so many things.. name resolution, misconfigured network. lots of reason. I would try a curl from that box to the open-uri target first
<phaul>
if curl/wget works doesn't work, you are not even looking at a ruby thing
<mozzarella>
doesn't work when passing a user-agent to open(), I guess it's not doing it properly
shpoont has quit [Max SendQ exceeded]
marr has joined #ruby
<havenwood>
mozzarella: I'd suggest playing with curl, wget or httpie as well and see what combos of things work.
<havenwood>
mozzarella: Vanilla httpie or wget with user-agent work. Maybe try to get curl working and you'll find the combo of things you need.
shpoont has joined #ruby
armyriad has joined #ruby
shpoont has quit [Client Quit]
kapil___ has quit [Quit: Connection closed for inactivity]
hndk has joined #ruby
_joes_ has joined #ruby
dviola has quit [Quit: WeeChat 2.1]
_joes_ has quit [Ping timeout: 256 seconds]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jaequery has joined #ruby
_joes_ has joined #ruby
jaequery has quit [Client Quit]
jaequery has joined #ruby
jaequery has quit [Client Quit]
jaequery has joined #ruby
jaequery has quit [Client Quit]
jaequery has joined #ruby
jaequery has quit [Client Quit]
jaequery has joined #ruby
jaequery has quit [Client Quit]
rabajaj has joined #ruby
ltt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rabajaj has quit [Client Quit]
megamos has joined #ruby
jcarl43 has joined #ruby
ldepandis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
imode1 has joined #ruby
rshetty has joined #ruby
JoshS has quit [Ping timeout: 256 seconds]
gr33n7007h has joined #ruby
gr33n7007h is now known as al2o3-cr
cagomez has joined #ruby
_joes_ has quit [Ping timeout: 256 seconds]
rshetty has quit [Ping timeout: 240 seconds]
rshetty has joined #ruby
adgtl has joined #ruby
adgtl has joined #ruby
adgtl has joined #ruby
p0s1x has joined #ruby
megamos has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
alfiemax has quit [Remote host closed the connection]
megamos has joined #ruby
p0s1x has quit [Client Quit]
alfiemax has joined #ruby
imode1 has quit [Ping timeout: 264 seconds]
jamesaxl has quit [Quit: WeeChat 2.0.1]
rshetty has quit [Ping timeout: 240 seconds]
<phaul>
thinking a bit more about the idea of FileTransform('file1', 'file2').by_lines { |line| lines * 2 } api. If I don't want to reinvent map and each_line etc, if we could have a File sink at the end of the enumerator chain
<apeiros>
should not be too difficult
<apeiros>
why don't you give it a shot?
<apeiros>
I'll help you if you're stuck
silviu has joined #ruby
<phaul>
nah, Im not going to be stuck :), Im trying to discuss random ideas if there are ppl listening. Maybe there will be someone pointing me to a gem saying it's been done. Which would be my bet. More interestingly there would be someone pointing me to a better idea, which would give more generic/more sensible api
<apeiros>
did you search for an existing solution?