« Back to channel list

#ruby - 09 July 2019

« Back 1 day Forward 1 day »
[00:04:29] lepepe: has joined #ruby
[00:13:39] skryking: has joined #ruby
[00:14:51] Exuma: has joined #ruby
[00:18:11] CCDelivery: has joined #ruby
[00:26:02] sarink: has joined #ruby
[01:00:35] fphilipe: has joined #ruby
[01:07:10] emptyfl4sk: has joined #ruby
[01:07:21] BTRE: has joined #ruby
[01:08:49] quarters: has joined #ruby
[01:09:02] noodle: has joined #ruby
[01:19:05] lepepe: has joined #ruby
[01:27:21] F3rn4: has joined #ruby
[01:28:02] molly: has joined #ruby
[01:28:07] fphilipe_: has joined #ruby
[01:28:45] Nicmavr: has joined #ruby
[01:29:10] F3rn4: has joined #ruby
[01:29:22] m27frogy: has joined #ruby
[01:29:53] Fenhl_: has joined #ruby
[01:31:14] llua: has joined #ruby
[01:31:34] gdrc: has joined #ruby
[01:35:26] lypsis: has joined #ruby
[01:36:44] SCHAPiE: has joined #ruby
[01:37:53] c0san0stra: has joined #ruby
[01:38:18] \13k: has joined #ruby
[01:39:05] fphilipe_: has joined #ruby
[01:44:37] involans: has joined #ruby
[01:47:24] emptyfl4sk: has joined #ruby
[02:05:36] involans: has joined #ruby
[02:09:36] haxx0r: has joined #ruby
[02:17:34] thejamespinto: has joined #ruby
[02:18:17] tdy: has joined #ruby
[02:18:29] fphilipe_: has joined #ruby
[02:20:56] bjpenn: has joined #ruby
[02:35:17] sarink: has joined #ruby
[02:38:12] DTZUZO: has joined #ruby
[02:39:23] bjpenn: has joined #ruby
[03:04:29] sarink: has joined #ruby
[03:09:17] chalkmonster: has joined #ruby
[03:09:27] braincrash: has joined #ruby
[03:17:34] Azure: has joined #ruby
[03:21:40] bjpenn: has joined #ruby
[03:35:49] Azure: has joined #ruby
[03:39:36] zacts|pi: has joined #ruby
[03:42:24] lepepe: has joined #ruby
[03:46:04] Exuma: has joined #ruby
[03:48:01] ascarter: has joined #ruby
[03:54:31] jhass: has joined #ruby
[04:05:24] emptyfl4sk: has joined #ruby
[04:10:38] jud: has joined #ruby
[04:49:32] fphilipe_: has joined #ruby
[04:50:10] sandstrom: has joined #ruby
[04:59:35] sarink: has joined #ruby
[05:08:15] ur5us: has joined #ruby
[05:08:33] sauvin_: has joined #ruby
[05:10:26] planigan: has joined #ruby
[05:11:44] cammellos: has joined #ruby
[05:11:51] za1b1tsu: has joined #ruby
[05:12:24] zacts|pi: has joined #ruby
[05:15:56] za1b1tsu: has joined #ruby
[05:17:50] conta: has joined #ruby
[05:19:18] ur5us: has joined #ruby
[05:20:44] ur5us: has joined #ruby
[05:35:59] exmortus: has joined #ruby
[05:38:52] conta: has joined #ruby
[05:42:27] Tempesta: has joined #ruby
[05:50:48] sarink: has joined #ruby
[05:54:12] zacts|pi: has joined #ruby
[06:02:16] akem-lnvo: has joined #ruby
[06:04:04] schne1der: has joined #ruby
[06:07:29] podlech: has joined #ruby
[06:07:32] molly: has joined #ruby
[06:10:33] sandstrom: has joined #ruby
[06:10:42] emptyfl4sk: has joined #ruby
[06:13:48] jud^: has joined #ruby
[06:14:46] vethis: has joined #ruby
[06:16:20] vethis: everyone asleep? lol
[06:16:49] havenwood: vethis: just waiting for Ruby questions!
[06:17:29] vethis: awesome. well i think i'm having more of a git-bash problem than a ruby one, but i am using ruby so here i am.
[06:19:28] vethis: i'm using git-bash for windows to learn with. all i'm trying to do is print a prompt for input, get input, and print the input result. easy! this works in every other terminal i use except git-bash. with git-bash it actually waits for input first before printing the rest. it's giving me a headache lol any insight as to why this is?
[06:22:02] vethis: i could give up and use another terminal, sure lol but i'm trying to use git-bash as an alternative as i'm having a different problem with another terminal >_>
[06:22:05] havenwood: vethis: you're trying to echo in bash or a bash function or your Ruby script doesn't work from git-bash?
[06:22:19] vethis: it's a ruby script
[06:22:26] jud: has joined #ruby
[06:22:35] havenwood: vethis: share the script?
[06:23:08] sarink: has joined #ruby
[06:23:48] vethis: https://dpaste.de/m56x
[06:25:44] vethis: and i'm using 2.5.5 *shrug*
[06:25:50] havenwood: vethis: So on git-bash you don't see "Gimme something: " until after you hit Enger?
[06:26:10] vethis: yea or entering a string
[06:27:25] kyrylo: has joined #ruby
[06:27:51] havenwood: vethis: Same result if you change `puts` to `STDOUT.puts` and change `gets` to `STDIN.gets`?
[06:30:20] vethis: yep same results
[06:31:28] havenwood: vethis: Try a STDOUT.flush after the first STOUT.puts?
[06:31:53] havenwood: vethis: Or: STDOUT.sync = true
[06:32:10] vethis: alright, flushing worked
[06:32:29] havenwood: vethis: Ah, so git-bash if buffering the output for some reason.
[06:32:38] vethis: well that's no fun
[06:33:00] havenwood: vethis: It should fix it if you up top once do a: STDOUT.sync = true
[06:33:34] sarink: has joined #ruby
[06:34:13] vethis: that's nifty. well that works fine! thank you havenwood
[06:34:25] havenwood: vethis: you're welcome
[06:34:32] havenwood: happy coding!
[06:34:39] vethis: are you familiar with the Cmder terminal for windows? :P
[06:34:59] havenwood: nope, I'm not familiar with Cmder.
[06:36:08] vethis: well that's unfortunate. my other issue, which made me switch to git-bash, was for some reason Cmder doesn't want to output bright colors anymore lol. i've been using the Colorize gem for weeks now and all of a sudden my bright colors just quit rendering in Cmder. another headache
[06:37:45] vethis: i'll have to deal with remembering STDOUT.sync until i can find a solution to Cmder's random quirk. thanks again i appreciate it!
[06:37:56] havenwood: vethis: Are you on Windows 10? You might try WSL or even WSL 2.
[06:38:03] havenwood: vethis: https://devblogs.microsoft.com/commandline/announcing-wsl-2/
[06:38:58] vethis: ah yes i am. i want to try WSL but i goofed and removed the Store app with a powershell decrappifier script haha. i hardly use microsoft stuff but once i found out about WSL i already screwed myself.
[06:39:13] vethis: can't re-enable the Store app to save my life. nothing works
[06:40:45] vethis: i hadn't needed it before though. the colorize gem uses the win32console(?) gem to enable colored output for windows. like i said it was working fine, even earlier today. then it just decided to stop. normal colors work fine but String.light_(color) just reverts to gray
[06:40:55] havenwood: vethis: do you even need the store for WSL? http://wsl-guide.org/en/latest/installation.html
[06:41:28] havenwood: Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
[06:41:42] havenwood: vethis: Run that ^ from PowerShell
[06:42:54] havenwood: I'm not sure what does or doesn't use the Store.
[06:43:49] vethis: ah! yeah i do have it installed then. i was thinking of the Debian package to use with WSL. this was a couple months ago when i was looking into it
[06:44:54] vethis: yeah Cmder gives me this error when trying to open with WSL
[06:44:57] vethis: note: bash.exe output: Windows Subsystem for Linux has no installed distributions.
[06:45:27] vethis: then gives me a link to get distributions, which only opens with the Store app apparently
[06:46:02] havenwood: vethis: lxrun /install
[06:46:43] vethis: well i'll be
[06:46:52] havenwood: vethis: or check? wslconfig /l
[06:47:38] havenwood: if the latter shows a distro, you can just use that
[06:48:12] sarink_: has joined #ruby
[06:48:39] sphenxes: has joined #ruby
[06:48:59] havenwood: wsl --setdefault ...
[06:49:37] vethis: yep, no distros. getting ubuntu now hopefully that's a smooth process
[06:49:48] havenwood: vethis: good luck!
[06:49:56] vethis: thanks again :P
[06:50:03] havenwood: you're welcome
[06:50:38] jud: has joined #ruby
[06:53:07] akem-lnvo: has joined #ruby
[06:53:10] schne1der: has joined #ruby
[06:55:31] queip: has joined #ruby
[06:56:31] DTZUZO: has joined #ruby
[06:58:31] TomyWork: has joined #ruby
[06:58:34] TimApple: has joined #ruby
[07:00:20] jud^: has joined #ruby
[07:04:20] jhass: has joined #ruby
[07:04:37] aupadhye: has joined #ruby
[07:06:25] ur5us: has joined #ruby
[07:14:41] reber: has joined #ruby
[07:18:05] emptyfl4sk: has joined #ruby
[07:18:20] andikr: has joined #ruby
[07:22:46] jhass|off: has joined #ruby
[07:24:36] sandstrom: has joined #ruby
[07:29:07] fphilipe_: has joined #ruby
[07:33:24] lepepe: has joined #ruby
[07:33:30] planigan: has joined #ruby
[07:37:11] Megamos: has joined #ruby
[07:38:37] chalkmon1: has joined #ruby
[07:46:42] chalkmonster: has joined #ruby
[07:48:06] tuor: has joined #ruby
[07:50:08] deepredsky: has joined #ruby
[07:51:19] DaRock: has joined #ruby
[07:54:10] chalkmon1: has joined #ruby
[07:54:40] akem-lnvo: has joined #ruby
[07:59:50] vondruch_: has joined #ruby
[08:02:39] m27frogy: has joined #ruby
[08:07:20] queip: has joined #ruby
[08:21:39] vondruch: has joined #ruby
[08:23:24] sarink: has joined #ruby
[08:25:06] lxsameer: has joined #ruby
[08:26:37] gdrc: has joined #ruby
[08:27:23] chalkmonster: has joined #ruby
[08:28:57] akem-lnvo: has joined #ruby
[08:31:53] yo-wan: has joined #ruby
[08:32:03] conta: has joined #ruby
[08:34:32] pwnd_nsfw: has joined #ruby
[08:42:12] zacts|pi: has joined #ruby
[08:46:36] ellcs: has joined #ruby
[08:49:41] BH23: has joined #ruby
[08:58:31] Guest42592: has joined #ruby
[09:00:26] cisco: has joined #ruby
[09:07:23] sarink: has joined #ruby
[09:09:44] queip: has joined #ruby
[09:19:01] emptyfl4sk: has joined #ruby
[09:26:33] sarink: has joined #ruby
[09:30:13] jhass: has joined #ruby
[09:35:13] themsay: has joined #ruby
[09:46:29] zoz: has joined #ruby
[09:47:00] n13z: has joined #ruby
[09:54:05] themsay: has joined #ruby
[10:04:22] sarink: has joined #ruby
[10:09:48] Swyper: has joined #ruby
[10:12:24] Dbugger: has joined #ruby
[10:14:48] BH23: has joined #ruby
[10:23:35] Swyper: has joined #ruby
[10:29:08] kyrylo: has joined #ruby
[10:34:10] conta: has joined #ruby
[10:36:58] BH23: has joined #ruby
[10:43:35] leitz: has joined #ruby
[10:49:46] sarink: has joined #ruby
[10:54:21] leitz: Newbie, could use some help with Sinatra calling a library. This line: https://github.com/makhidkarun/ftl_tools/blob/reorg_to_lib/bin/crewgen.rb#L11
[10:55:01] leitz: Should call this: https://github.com/makhidkarun/ftl_tools/blob/reorg_to_lib/lib/ftl_tools/crewgen.rb
[10:55:55] leitz: so that when I run the first command and go to "localhost:4567/crew" it should recognize the route.
[10:56:34] leitz: instead, I'm getting the "Sinatra doesn't know this ditty", so my guess is that I'm not creating the application object correctly.
[10:57:01] leitz: What am I missing?
[11:11:19] lepepe: has joined #ruby
[11:13:56] grenierm_: has joined #ruby
[11:17:29] evdubs: has joined #ruby
[11:18:46] leftylink: IIRC, and from what I see on http://sinatrarb.com/ , require 'sinatra' runs a sinatra app w/ any `get` (and others) that are called on the top level. there are zero such calls, therefore the sinatra app knows no routes and therefore "doesn't know this ditty". it is true that there is an application `crew` that got created, but that `crew` isn't doing anything. that CrewGen is a
[11:18:51] leftylink: https://www.rubydoc.info/gems/sinatra#Sinatra__Base_-_Middleware__Libraries__and_Modular_Apps , and reading that corresponding section will be helpful
[11:19:26] leitz: leftylink, thanks!
[11:19:31] leitz: ACTION goes to read.
[11:19:56] emptyfl4sk: has joined #ruby
[11:28:02] Swyper: has joined #ruby
[11:30:25] leitz: leftylink, I've gotten it to work; thanks! Of course, that doesn't mean I deeply understand it, but it does work. Progress...
[11:45:41] snowy: has joined #ruby
[11:47:53] sarink: has joined #ruby
[11:49:22] Ca1us: has joined #ruby
[11:49:23] Ca1us: has joined #ruby
[11:51:12] szulak: has joined #ruby
[11:52:10] sezuan_: has joined #ruby
[11:52:43] gbristol_: has joined #ruby
[11:54:49] spectra-: has joined #ruby
[11:55:04] Ca1us: has joined #ruby
[11:55:05] Ca1us: has joined #ruby
[11:55:36] DaRock: has joined #ruby
[12:01:32] Norrin: has joined #ruby
[12:01:32] n1v: has joined #ruby
[12:01:32] vqrs_: has joined #ruby
[12:01:32] timeless: has joined #ruby
[12:01:32] JayDoubleu: has joined #ruby
[12:01:32] siasmj: has joined #ruby
[12:01:32] TheBrayn: has joined #ruby
[12:01:32] gajus: has joined #ruby
[12:01:32] Argorok: has joined #ruby
[12:01:32] mkaito: has joined #ruby
[12:01:32] kapilp: has joined #ruby
[12:01:32] liKe2k1: has joined #ruby
[12:01:32] Kilo`byte: has joined #ruby
[12:01:32] jokester: has joined #ruby
[12:01:32] iamdevnul: has joined #ruby
[12:01:32] Nuck: has joined #ruby
[12:01:32] zipkid: has joined #ruby
[12:01:33] hsiktas: has joined #ruby
[12:01:33] fowlduck: has joined #ruby
[12:01:33] darthThorik: has joined #ruby
[12:01:33] raggi: has joined #ruby
[12:01:33] KevinSjoberg: has joined #ruby
[12:01:33] manveru: has joined #ruby
[12:01:33] BuildTheRobots: has joined #ruby
[12:01:33] towo: has joined #ruby
[12:01:33] Iambchop: has joined #ruby
[12:01:33] jacksoow: has joined #ruby
[12:01:33] krasnus: has joined #ruby
[12:01:33] heyimwill: has joined #ruby
[12:01:33] ndrst: has joined #ruby
[12:01:33] creat: has joined #ruby
[12:01:33] linuxdaemon: has joined #ruby
[12:02:44] lepepe: has joined #ruby
[12:03:18] deepredsky: has joined #ruby
[12:04:40] JayDoubleu: has joined #ruby
[12:05:57] kapilp: has joined #ruby
[12:06:05] BuildTheRobots: has joined #ruby
[12:06:12] hsiktas: has joined #ruby
[12:08:26] Nicmavr: has joined #ruby
[12:09:15] linuxdaemon: has joined #ruby
[12:09:17] gigetoo: has joined #ruby
[12:12:07] xco: has joined #ruby
[12:15:34] olspookishmagus: has joined #ruby
[12:18:26] go|dfish: has joined #ruby
[12:19:50] leitz: is there a way to put what's in config.ru onto the rackup command? I'm trying to figure out how to add the "run X/YZ" bit.
[12:22:27] yalue: has joined #ruby
[12:24:14] lepepe: has joined #ruby
[12:33:13] conta: has joined #ruby
[12:33:58] cisco: has joined #ruby
[12:34:49] AJA4350: has joined #ruby
[12:35:17] reber: has joined #ruby
[12:37:14] involans: has joined #ruby
[12:46:40] sarink: has joined #ruby
[12:49:26] leitz: This is what I'm trying. Running it on the command line works. system("rackup -I ../lib -r ftl_tools -s thin -p 4567 ./crewgen_config.ru")
[13:00:29] sarink: has joined #ruby
[13:03:22] CCDelivery: has joined #ruby
[13:03:36] lepepe: has joined #ruby
[13:10:22] CCDelivery_: has joined #ruby
[13:10:28] yalue: has joined #ruby
[13:20:59] emptyfl4sk: has joined #ruby
[13:36:27] lepepe_: has joined #ruby
[13:45:10] fphilipe: has joined #ruby
[13:45:37] Inline: has joined #ruby
[13:47:31] sarink: has joined #ruby
[13:53:05] Megamos: has joined #ruby
[13:56:49] Azure: has joined #ruby
[13:58:06] xfbs: has joined #ruby
[14:04:30] DTZUZO: has joined #ruby
[14:07:49] jtperreault: has joined #ruby
[14:09:33] Azure: has joined #ruby
[14:18:22] sarink_: has joined #ruby
[14:20:08] tf2ftw: has joined #ruby
[14:20:43] Azure: has joined #ruby
[14:22:03] queip: has joined #ruby
[14:22:20] tf2ftw: I haven't found a way to do this so I assume it doesn't exist but I figured I'd ask here as a last resort. Is it possible to add a gem to a gemspec via Bundler? I'm looking for the same type of functionality `bundle add` provides but instead of modifying the Gemfile it updates gemspec.
[14:27:20] lucasb: has joined #ruby
[14:29:34] involans_: has joined #ruby
[14:29:49] Esa_: has joined #ruby
[14:51:00] rippa: has joined #ruby
[14:51:51] fphilipe: has joined #ruby
[14:57:18] deepredsky: has joined #ruby
[14:58:19] brool: has joined #ruby
[15:02:52] lepepe: has joined #ruby
[15:19:04] lepepe_: has joined #ruby
[15:21:50] emptyfl4sk: has joined #ruby
[15:30:22] deepredsky: has joined #ruby
[15:39:37] going_insane_fas: has joined #ruby
[15:41:09] going_insane_fas: What could be causing this ?
[15:41:11] going_insane_fas: https://imgur.com/a/cl20NFJ
[15:44:30] codefriar: has joined #ruby
[15:45:53] codefriar: has joined #ruby
[15:47:51] ytti: jesus h christ, imgur as pastebin, well at least the bot doesn't complain
[15:48:27] ytti: maybe there is bundle file there locking that file
[15:48:35] fphilipe: has joined #ruby
[15:48:48] schne1der: has joined #ruby
[15:49:43] going_insane_fas: I don't know how bundle locks work... when you mean there, do you mean the current directory ?
[15:50:33] zacts: has joined #ruby
[15:51:05] DTZUZO: has joined #ruby
[15:51:38] ytti: yeah i'm not too familiar either,and i think i'd just strace it to see what happens when i call the bundler
[15:52:03] ytti: but that may be the lazy man's approach, smarter man probably would try to understand instead of brute force
[15:52:57] going_insane_fas: I've literally never used the gem ecosystem before... so I don't really know where to sink my teeth in this.
[15:53:10] going_insane_fas: strace sounds like a good idea
[15:57:21] snowy: has joined #ruby
[15:57:40] emptyfl4sk: has joined #ruby
[16:01:18] sandstrom: has joined #ruby
[16:02:18] phaul: I would check the PATH to make sure bundle is the bundle that was last installed. the command "which bundle" might help
[16:05:29] phaul: outher thing that you could try is updating the locate db, run slocate bundle and try each with --version and full path to see which one you want
[16:06:38] codefriar: has joined #ruby
[16:14:46] going_insane_fas: thanks for the tip.
[16:15:29] involans: has joined #ruby
[16:18:04] deepreds1: has joined #ruby
[16:20:49] orbyt_: has joined #ruby
[16:24:25] Dr_MDMA_MD: has joined #ruby
[16:27:23] Scriptonaut: has joined #ruby
[16:28:25] Scriptonaut: hey all, I wrote a small script to run a command if my site doesn't respond with a "200" 3 times in a row. It was working fine where I wrote it (ruby 2.5 something), but when I put it on a production server running ruby 1.8.7, it just hangs on the "http.request(request)" on line 16.
[16:28:30] Scriptonaut: https://gist.github.com/robins35/e1b9e0c5beb2e4d8f9ca6828981c9cb7
[16:28:35] Scriptonaut: Eventually I get a timeout error
[16:29:03] Scriptonaut: anyone know why the code would work in ruby 2.5 and not 1.8.7? I've used net/https plenty of times on ruby 1.8.7 without problems
[16:32:18] reber: has joined #ruby
[16:33:31] reber_: has joined #ruby
[16:36:51] havenwood: Scriptonaut: Can you tell from the exception whether it's open_timeout, read_timeout or ssl_timeout?
[16:38:22] havenwood: Scriptonaut: Does 1.8 work with modern ssl? I'm not spotting anything.
[16:38:34] havenwood: Scriptonaut: Does it work for non-ssl sites?
[16:39:49] Scriptonaut: havenwood: let me test
[16:39:52] Scriptonaut: the timeout takes a long time
[16:40:07] jaequery: has joined #ruby
[16:40:39] maryo: has joined #ruby
[16:42:53] havenwood: Scriptonaut: You might try setting a short `http.open_timeout = ..` then `http.read_timeout = ..`, etc.
[16:43:20] Scriptonaut: Errno::ETIMEDOUT: Connection timed out - connect(2)
[16:43:22] havenwood: I didn't use Net::HTTP until 1.9. :)
[16:44:10] Scriptonaut: that time I got: Timeout::Error: execution expired
[16:44:20] Scriptonaut: havenwood: what did you use before then? I can't remember what I used back in the 1.8 days
[16:44:34] Scriptonaut: I really just need to grab a status code, could do it with curl but would rather not do system calls
[16:44:38] havenwood: Scriptonaut: I was a lawyer back then. I did a different kind of code. :P
[16:45:29] involans: has joined #ruby
[16:47:07] havenwood: Scriptonaut: I suspect an ssl issue.
[16:47:15] Scriptonaut: I think so too
[16:47:30] Scriptonaut: the googling I did said it might be an ssl version thing
[16:47:46] Scriptonaut: I tried commenting out the http.use_ssl = true
[16:51:31] al2o3-cr: Scriptonaut: just out of interest what does this return: Net::HTTP.get_response URI('http://yoursite.com')
[16:52:29] Scriptonaut: with http or https?
[16:52:47] Scriptonaut: oh it gives me a 200
[16:52:51] Scriptonaut: weird, I thought it would redirect like curl does
[16:52:57] Scriptonaut: using http just hangs
[16:54:36] al2o3-cr: so it it hangs using https?
[16:56:02] Scriptonaut: when I curl with http I get a 301
[16:58:22] Scriptonaut: this is really confusing
[16:58:32] Scriptonaut: why would curl give me a 301 and Net::HTTP.get_response give me a 200
[16:58:34] Guest42592: has joined #ruby
[16:58:40] tdy: has joined #ruby
[16:59:16] al2o3-cr: Scriptonaut: not sure
[17:04:57] AJA4351: has joined #ruby
[17:05:01] pygmypuppy: has joined #ruby
[17:15:41] fphilipe: has joined #ruby
[17:15:59] DTZUZO: has joined #ruby
[17:18:31] sarink: has joined #ruby
[17:19:42] gix: has joined #ruby
[17:21:45] deepredsky: has joined #ruby
[17:22:37] miskatonic: has joined #ruby
[17:30:27] emptyfl41: has joined #ruby
[17:35:38] fphilipe: has joined #ruby
[17:39:20] mcspud: has joined #ruby
[17:47:32] snowy: has joined #ruby
[17:52:33] sagax: has joined #ruby
[17:55:33] codefriar: has joined #ruby
[17:56:51] hutch: has joined #ruby
[18:02:25] codefriar: has joined #ruby
[18:02:51] leah2: has joined #ruby
[18:07:12] miskatonic: has joined #ruby
[18:09:04] absolutejam1: has joined #ruby
[18:11:58] chalkmonster: has joined #ruby
[18:12:15] involans: has joined #ruby
[18:21:42] codefriar: has joined #ruby
[18:32:44] snowy: has joined #ruby
[18:38:44] tdy1: has joined #ruby
[18:43:11] CCDelivery_: has joined #ruby
[18:50:52] ellcs1: has joined #ruby
[18:52:16] zacts: has joined #ruby
[18:54:16] involans: has joined #ruby
[18:55:30] themsay: has joined #ruby
[18:56:10] dviola: has joined #ruby
[18:58:36] Megamos: has joined #ruby
[19:02:07] sphenxes: has joined #ruby
[19:03:15] fphilipe: has joined #ruby
[19:03:18] code_zombie: has joined #ruby
[19:12:13] Exuma: has joined #ruby
[19:16:26] snowy: has joined #ruby
[19:17:02] tf2ftw: has joined #ruby
[19:17:57] cd: has joined #ruby
[19:17:58] ellcs1: has joined #ruby
[19:18:03] queip: has joined #ruby
[19:24:11] iffraff: has joined #ruby
[19:31:02] codefriar: has joined #ruby
[19:33:01] sandstrom: has joined #ruby
[19:36:18] iffraff: has joined #ruby
[19:38:00] tabakhase: has joined #ruby
[19:40:05] Fusl: has joined #ruby
[19:41:14] tdy2: has joined #ruby
[19:43:04] Fusl: has joined #ruby
[19:44:24] queip: has joined #ruby
[19:44:32] Fusl: has joined #ruby
[19:48:51] bjpenn: has joined #ruby
[19:49:19] bjpenn: hey guys, im trying to find an alternative way to write this code to pass rubocop exception: curl_options = '-sX POST -w "%{http_code}"'
[19:49:39] bjpenn: it violates this rubocop error: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
[19:50:15] bjpenn: any ideas? :)
[19:50:43] tw1sted: has joined #ruby
[19:52:11] havenwood: bjpenn: Normally you'd write: "-sX POST -w \"#{http_code}\""
[19:52:34] havenwood: bjpenn: You might consider not shelling out to curl, if that's an option.
[19:53:04] snowy: has joined #ruby
[19:53:24] havenwood: bjpenn: There are solid gems with bindings to libcurl, Net::HTTP or other gems.
[19:54:51] jaequery: has joined #ruby
[19:57:48] jaequery: has joined #ruby
[19:58:19] codefriar: has joined #ruby
[20:01:32] bjpenn: havenwood: oh really? i mainly wanted to write something that could be a wrapper to curl, that can take in shell parameters like -X POST, -X GET, -v
[20:03:05] havenwood: bjpenn: https://jhawthorn.github.io/curl-to-ruby/
[20:03:30] bjpenn: just fyi, even with this: "-sX POST -w \"#{http_code}\"", i get the rubocop error still
[20:03:58] havenwood: bjpenn: Show the context of the code?
[20:03:58] havenwood: https://github.com/jhawthorn/curl-to-ruby/blob/gh-pages/src/curlToRuby.js
[20:06:17] bjpenn: essentially, it parses the CLI for parameters to the script, and takes those parameters, and runs `curl #{params}"`
[20:06:49] bjpenn: otherwise i'd have to implement separate functionality for every parameter that curl provides
[20:06:53] bjpenn: to cover all cases
[20:07:49] bjpenn: for example, if someone wanted to curl <microserviceA> with /foo/bar/ using POST, and wanted verbose output, they can just ./curl-script microserviceA /foo/bar/ -X POST -v
[20:08:14] bjpenn: it'd know how to find the url for microserviceA, along with its credentials, etc
[20:08:33] tdy2: has joined #ruby
[20:09:15] bjpenn: havenwood: but yeah, ideally, for making a specific call, i'd love to just use net/http
[20:09:46] bjpenn: just a lot cleaner
[20:09:56] bjpenn: instead of having to parse curl output
[20:20:25] ellcs1: has joined #ruby
[20:26:32] bjpenn: has joined #ruby
[20:27:12] MuffinPimp: has joined #ruby
[20:38:43] codefriar: has joined #ruby
[20:40:37] SeepingN: has joined #ruby
[20:40:53] tdy3: has joined #ruby
[20:41:43] LenPayne: has joined #ruby
[20:42:41] leah2: has joined #ruby
[20:44:17] tdy3: has joined #ruby
[20:49:22] akem-lnvo: has joined #ruby
[20:56:44] xco: has joined #ruby
[20:57:12] tf2ftw: has joined #ruby
[21:04:09] Xiti: has joined #ruby
[21:04:47] fphilipe: has joined #ruby
[21:04:57] tdy3: has joined #ruby
[21:08:43] RyanMcCoskrie: has joined #ruby
[21:11:31] RyanMcCoskrie: has joined #ruby
[21:11:48] Swyper: has joined #ruby
[21:13:04] Swyper: has joined #ruby
[21:13:24] RyanMcCoskrie: has joined #ruby
[21:14:55] ur5us: has joined #ruby
[21:18:46] Swyper: has joined #ruby
[21:19:24] snowy: has joined #ruby
[21:25:43] jaequery: has joined #ruby
[21:29:38] Swyper: has joined #ruby
[21:34:38] lepepe: has joined #ruby
[21:47:05] akem-lnvo: has joined #ruby
[21:57:42] snowy: has joined #ruby
[22:00:47] sarink: has joined #ruby
[22:21:06] lepepe: has joined #ruby
[22:23:19] tpanarch1st: has joined #ruby
[22:23:59] sarink: has joined #ruby
[22:32:49] lepepe: has joined #ruby
[22:43:19] nowhereman: has joined #ruby
[22:46:18] shah^: has joined #ruby
[22:48:42] Nicmavr: has joined #ruby
[22:51:33] chamunks: has joined #ruby
[22:55:44] xco: has joined #ruby
[23:03:42] Exuma: has joined #ruby
[23:05:16] queip: has joined #ruby
[23:05:53] fphilipe: has joined #ruby
[23:08:15] RedSnarf: has joined #ruby
[23:20:50] jenrzzz: has joined #ruby
[23:29:09] d^sh: has joined #ruby
[23:38:41] tpanarch1st: has joined #ruby
[23:41:57] lepepe: has joined #ruby
[23:45:56] emptyflask: has joined #ruby
[23:59:57] d^sh: has joined #ruby