<feep[work]>
this leads to the hilarious consequence that when I call it with autocorrect, it first removes the disable and then applies the fix anyways
<feep[work]>
quite aggressive :)
x0n has quit [Read error: Connection reset by peer]
x0n has joined #ruby
ellcs has joined #ruby
ur5us has quit [Ping timeout: 244 seconds]
<feep[work]>
... uh, it works if I write rubocop:disable=Style/IfUnlessModifier
<feep[work]>
wtf
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Axy has quit [Ping timeout: 256 seconds]
jerome__ has joined #ruby
ellcs has quit [Ping timeout: 256 seconds]
cliluw has quit [Read error: Connection reset by peer]
jerome___ has quit [Ping timeout: 256 seconds]
cliluw has joined #ruby
cliluw has quit [Read error: Connection reset by peer]
ellcs has joined #ruby
cliluw has joined #ruby
rippa has joined #ruby
cliluw has quit [Read error: Connection reset by peer]
cliluw has joined #ruby
cliluw has quit [Ping timeout: 260 seconds]
cliluw has joined #ruby
cliluw has quit [Read error: Connection reset by peer]
drincruz has joined #ruby
cliluw has joined #ruby
<IsoLinCHiP>
Hi, is anyone aware of any gems that make caching ruby objects easy? I am working on a CLI tool that needs to fetch external resources over a slow REST API, which partially dont change at all or only change infrequently.
Ai9zO5AP has joined #ruby
<IsoLinCHiP>
Most hits I found were very specific to rails or rack.
<feep[work]>
anyway, filed a bug for it~
feep[work] has left #ruby [#ruby]
yasumi2136 has joined #ruby
ellcs has quit [Ping timeout: 240 seconds]
ellcs has joined #ruby
ap4y has quit [Ping timeout: 265 seconds]
drincruz has quit [Ping timeout: 256 seconds]
alexherbo2 has quit [Ping timeout: 240 seconds]
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
ellcs has quit [Ping timeout: 240 seconds]
adu has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
drincruz has joined #ruby
bukkitgerman8608 has quit [Quit: Ping timeout (120 seconds)]
bukkitgerman8608 has joined #ruby
cliluw has quit [Ping timeout: 240 seconds]
cliluw has joined #ruby
BTRE has quit [Remote host closed the connection]
Dara has joined #ruby
lipoqil has joined #ruby
dualfade has quit [Read error: Connection reset by peer]
dualfade has joined #ruby
fercell has quit [Quit: WeeChat 2.8]
lipoqil has quit [Quit: ZNC 1.6.5+deb1+deb9u2 - http://znc.in]
lipoqil has joined #ruby
TCZ has joined #ruby
cliluw has quit [Read error: Connection reset by peer]
Rudd0 has quit [Ping timeout: 258 seconds]
cliluw has joined #ruby
<adam12>
IsoLinCHiP: The moneta gem maybe.
alexherbo2 has joined #ruby
meinside has quit [Quit: Connection closed for inactivity]
fercell has joined #ruby
<adam12>
IsoLinCHiP: Depending on the http library you're using, maybe you can cache the responses to match the etag/cache control header. Something like Faraday middleware.
cliluw has quit [Ping timeout: 256 seconds]
cliluw has joined #ruby
alexherbo2 has quit [Ping timeout: 258 seconds]
cliluw has quit [Ping timeout: 240 seconds]
<IsoLinCHiP>
adam12: Ill look into that, thanks.
cliluw has joined #ruby
elcuervo has quit [Read error: Connection reset by peer]
sgen has joined #ruby
<IsoLinCHiP>
Though I didnt want to cache the http calls, more the processed objects
<adam12>
IsoLinCHiP: Beware how you cache the objects. It's frequently fine, but if it uses Marshall just know it's not portable across Ruby versions.
elcuervo has joined #ruby
<adam12>
IsoLinCHiP: So if this is a CLI tool and you store the marshall'd objects in PStore or something, you run the risk of the tool not working if the Ruby version changes. Just FYI.
sgen has quit [Max SendQ exceeded]
sgen has joined #ruby
<IsoLinCHiP>
That would be fine, as long as I can tell the cache is corrupted, I would then just refresh, I just want to to feel more snappy and produce less load on the REST API.
<IsoLinCHiP>
Moneta looks interesting and overwhelming at the same time :-D adam12
cliluw has quit [Read error: Connection reset by peer]
cliluw has joined #ruby
<IsoLinCHiP>
Maybe I am looking for a memoize mixin. I kinda want the gem to do the heavy lifting and not worry so much about the caching strategy and invalidation (#hardproblems)
<adam12>
Maybe. But that's memoizing possibly just per-process. Is that what you want?
llua has joined #ruby
cliluw has quit [Read error: Connection reset by peer]
cliluw has joined #ruby
<IsoLinCHiP>
Good point. Moneta definately looks worth investing some time. So thanks for that allready! :) Probably a factory class that uses fetch() would solve part of what I want.
cliluw has quit [Read error: Connection reset by peer]
alexherbo2 has joined #ruby
cliluw has joined #ruby
<IsoLinCHiP>
And I actually found that rest-client has an components extension that actually supports plugging in Rack middleware, so that might actually help too. Thanks!
<adam12>
IsoLinCHiP: Caching at the HTTP layer makes the _most_ sense to me, unless it's super heavy in regards to parsing. But if you get JSON back and you can cache it with the expiry you receive from Cache-Control header, seems like the best solution.
<adam12>
Probably a dozen ways to approach this tho.
<IsoLinCHiP>
adam12: Definately going to use it on the resources that *can* change. But feels wrong for those that *never* will change, but might be a good start for those as well.
<IsoLinCHiP>
At least it should solve the 'feels snappy' requirement
GodFather has joined #ruby
cliluw has quit [Ping timeout: 256 seconds]
cliluw has joined #ruby
GodFather_ has joined #ruby
alexherbo2 has quit [Ping timeout: 240 seconds]
BTRE has joined #ruby
cliluw has quit [Read error: Connection reset by peer]
cliluw has joined #ruby
coniptor has quit [Ping timeout: 240 seconds]
DarthGandalf has quit [Ping timeout: 246 seconds]
GodFather_ has quit [Ping timeout: 240 seconds]
adu has quit [Quit: adu]
coniptor has joined #ruby
davispuh has joined #ruby
alexherbo2 has joined #ruby
GodFather_ has joined #ruby
GodFather_ has quit [Ping timeout: 240 seconds]
fercell has quit [Quit: WeeChat 2.8]
cthulchu_ has joined #ruby
cliluw has quit [Read error: Connection reset by peer]
cliluw has joined #ruby
Mutsuhito has quit [Ping timeout: 240 seconds]
UncleCid has quit [Read error: Connection reset by peer]
bsdbandit-01 has quit [Ping timeout: 240 seconds]
darthThorik has quit [Ping timeout: 240 seconds]
Tempesta has quit [Ping timeout: 240 seconds]
evert has quit [Read error: Connection reset by peer]
coniptor has quit [Ping timeout: 240 seconds]
KnownSyntax has quit [Ping timeout: 240 seconds]
peteretep has quit [Ping timeout: 240 seconds]
MentalPower has quit [Ping timeout: 240 seconds]
graphicsv has quit [Ping timeout: 240 seconds]
kwilczynski has quit [Ping timeout: 240 seconds]
pyrmont has quit [Ping timeout: 240 seconds]
bruce_lee has quit [Ping timeout: 240 seconds]
swaggboi has quit [Ping timeout: 240 seconds]
yxhuvud has quit [Ping timeout: 240 seconds]
sysh has quit [Ping timeout: 240 seconds]
powerhouse has quit [Ping timeout: 240 seconds]
Mikaela has quit [Ping timeout: 240 seconds]
baojg has quit [Ping timeout: 240 seconds]
markin has quit [Ping timeout: 240 seconds]
mozzarella has quit [*.net *.split]
hagabaka has quit [*.net *.split]
JasonO has quit [*.net *.split]
balo has quit [*.net *.split]
braincrash has quit [*.net *.split]
CrazyEddy has quit [*.net *.split]
w10x12 has quit [*.net *.split]
phenom has quit [*.net *.split]
jinie has quit [*.net *.split]
BH23 has quit [*.net *.split]
mydog2 has quit [*.net *.split]
kozowu has quit [*.net *.split]
dorian has quit [*.net *.split]
probonic has quit [*.net *.split]
madhatter has quit [*.net *.split]
Eiam has quit [*.net *.split]
mcspud has quit [*.net *.split]
deimos_ has quit [*.net *.split]
major_majors has quit [*.net *.split]
e has quit [*.net *.split]
GodFather has quit [*.net *.split]
sgen has quit [*.net *.split]
elcuervo has quit [*.net *.split]
TomyWork has quit [*.net *.split]
vondruch has quit [*.net *.split]
lektrik has quit [*.net *.split]
ruurd has quit [*.net *.split]
Rounin has quit [*.net *.split]
sirecote has quit [*.net *.split]
ule has quit [*.net *.split]
blender_ has quit [*.net *.split]
pppktz has quit [*.net *.split]
havenwood has quit [*.net *.split]
stnly has quit [*.net *.split]
CalimeroTeknik has quit [*.net *.split]
mojca has quit [*.net *.split]
arthurnn has quit [*.net *.split]
DTZUZU has quit [*.net *.split]
cadeskywalker has quit [*.net *.split]
leftylink has quit [*.net *.split]
shaman42 has quit [*.net *.split]
extrowerk has quit [*.net *.split]
baweaver has quit [*.net *.split]
Jello_Raptor has quit [*.net *.split]
liKe2k1- has quit [*.net *.split]
titanbiscuit has quit [*.net *.split]
quintasan has quit [*.net *.split]
sonne has quit [*.net *.split]
Exagone313 has quit [*.net *.split]
ablackack has quit [*.net *.split]
salvor has quit [*.net *.split]
Frogging101 has quit [*.net *.split]
EdwardIII has quit [*.net *.split]
kenichi has quit [*.net *.split]
void09 has quit [*.net *.split]
davispuh has quit [*.net *.split]
llua has quit [*.net *.split]
lipoqil has quit [*.net *.split]
roadt_ has quit [*.net *.split]
johnny56 has quit [*.net *.split]
dasher00 has quit [*.net *.split]
TzilTzal has quit [*.net *.split]
bvdw has quit [*.net *.split]
ua has quit [*.net *.split]
FastJack has quit [*.net *.split]
dostoyevsky has quit [*.net *.split]
skryking has quit [*.net *.split]
z4phod has quit [*.net *.split]
akem has quit [*.net *.split]
Sauvin has quit [*.net *.split]
mbrndtgn has quit [*.net *.split]
cranq has quit [*.net *.split]
rafadc has quit [*.net *.split]
j416 has quit [*.net *.split]
gmcintire has quit [*.net *.split]
GGMethos has quit [*.net *.split]
_whitelogger has joined #ruby
legit has joined #ruby
gmcintire has joined #ruby
Iambchop has joined #ruby
Chew has joined #ruby
GGMethos has joined #ruby
Atro has joined #ruby
apotheon has joined #ruby
cstrahan has joined #ruby
spectra has joined #ruby
Net has joined #ruby
TheBrayn has joined #ruby
CustosLimen has joined #ruby
Lewix has joined #ruby
jnoon has joined #ruby
gajus has joined #ruby
jetpack_joe has joined #ruby
mnemon has joined #ruby
danielk43[m] has joined #ruby
tobiasvl has joined #ruby
manveru has joined #ruby
russt_ has joined #ruby
Takumo has joined #ruby
CommunistWolf has joined #ruby
jhill has joined #ruby
adu has joined #ruby
gix has joined #ruby
jhill has quit [Ping timeout: 244 seconds]
CustosLimen has quit [Ping timeout: 244 seconds]
CustosLimen has joined #ruby
jhill has joined #ruby
lektrik has quit [Ping timeout: 256 seconds]
alexherbo2 has quit [Quit: Ping timeout (120 seconds)]
alexherbo2 has joined #ruby
Rudd0 has joined #ruby
GodFather_ has joined #ruby
GodFather_ has quit [Remote host closed the connection]
ruurd has quit [Quit: ZZZzzz…]
yasumi2136 has quit [Quit: Konversation terminated!]
<adam12>
maryo: That's your entire lock file or just the relevant line?
<maryo>
adam12, that's the entire lock file
<adam12>
maryo: Is this lock file in version control? It's incomplete.
<maryo>
adam12, does this lock file gets created automatically ?
<adam12>
maryo: Yes. Without using the `--deployment` flag, it would be created upon first `bundle install` and updated upon other actions.
<adam12>
(deployment flag implies that the Gemfile.lock already exists and is valid)
<maryo>
adam12, understood.. Thanks a lot o/
<adam12>
maryo: If you still get the error with a full Gemfile.lock, it might be a bug. But there should probably be a couple dozen more lines in that file.
cb_ has quit [Ping timeout: 264 seconds]
<maryo>
adam12, thank you, I was trying to Dockerize my Rails Application and thought will directly run bundle command like this --> https://dpaste.org/fdqf
<adam12>
maryo: For my Dockerfiles, I do 2 copies. First COPY Gemfile Gemfile.lock ./, then RUN bundle install, then COPY the rest of the app.
<adam12>
(I don't bother excluding groups but that's because I use the same Dockerfile across all envs)
<maryo>
adam12, I am building it from Windows Host and I get the below error message more frequently. Any ways to suppress / fix it?
<maryo>
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
<adam12>
maryo: No suggestions tbh. I don't use Ruby on Windows outside of WSL.
<maryo>
adam12, ok
chalkmonster has joined #ruby
houhoulis has joined #ruby
tubbo has quit [Ping timeout: 272 seconds]
houhoulis has quit [Remote host closed the connection]
ruurd has joined #ruby
Tempesta_ has joined #ruby
tubbo has joined #ruby
Tempesta has quit [Ping timeout: 240 seconds]
TzilTzal has quit [Quit: Leaving.]
fercell has joined #ruby
johnny56 has quit [Ping timeout: 258 seconds]
Ai9zO5AP has quit [Ping timeout: 240 seconds]
chalkmonster has quit [Quit: WeeChat 2.9]
Ai9zO5AP has joined #ruby
fercell has quit [Quit: WeeChat 2.8]
Tempesta_ has left #ruby ["Closing Channel, bye."]
Tempesta has joined #ruby
roshanavand has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
r29v has quit [Quit: r29v]
greengriminal has joined #ruby
johnny56 has joined #ruby
cyrus_mc_ has quit [Quit: Connection closed]
dionysus69 has joined #ruby
dionysus69 has quit [Remote host closed the connection]
claw has quit [Read error: Connection reset by peer]
maryo has quit [Read error: Connection reset by peer]
claw has joined #ruby
roshanavand_ has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roshanavand has quit [Ping timeout: 258 seconds]
roshanavand_ is now known as roshanavand
ap4y has joined #ruby
CrazyEddy has joined #ruby
Mattx has quit [Remote host closed the connection]
ur5us has joined #ruby
cd has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jerome__ has quit [Remote host closed the connection]
orbyt_ has joined #ruby
Mia has quit [Read error: Connection reset by peer]
yasumi2136_ has joined #ruby
yasumi2136 has quit [Ping timeout: 258 seconds]
dhollinger has quit [Ping timeout: 240 seconds]
dhollinger has joined #ruby
r29v has joined #ruby
swagg_boi has quit [Quit: C-x C-c]
johnny56 has quit [Ping timeout: 258 seconds]
ChmEarl has quit [Quit: Leaving]
wild_buffalo has joined #ruby
<wild_buffalo>
What does it mean when the class angle bracket is facing the other way?
<wild_buffalo>
e.g.: class Metasploit3 > Msf::Exploit::Remote
<wild_buffalo>
If I understand correctly, class stuff < thing means stuff inherits from thing
alexherbo2 has quit [Ping timeout: 240 seconds]
va3vna has joined #ruby
cadeskywalker has quit [Ping timeout: 240 seconds]
lektrik has quit [Ping timeout: 240 seconds]
Rudd0 has quit [Ping timeout: 240 seconds]
johnny56 has joined #ruby
Rudd0^ has joined #ruby
johnny56 has quit [Ping timeout: 240 seconds]
ellcs has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ai9zO5AP has quit [Ping timeout: 240 seconds]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
alexherbo2 has joined #ruby
robert__ has joined #ruby
cadeskywalker has joined #ruby
Ai9zO5AP has joined #ruby
UncleCidd has quit [Ping timeout: 258 seconds]
UncleCidd has joined #ruby
robert__ has quit [Ping timeout: 244 seconds]
lektrik has joined #ruby
va3vna has quit [Ping timeout: 265 seconds]
johnny56 has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rubyn00b has joined #ruby
johnny56 has quit [Ping timeout: 240 seconds]
GodFather has quit [Ping timeout: 258 seconds]
<rubyn00b>
Hello, I'm almost done connecting the command line programs using IO. Here's where I've simplified the problem to: URI.open('https://dl.pstmn.io/download/latest/linux64').then { |io| IO.popen('tar tvzf -', mode='r+', :in=>io) }.each { |line| puts line } But then I get an error: ./i.rb:84:in `popen': fd 0 specified twice (ArgumentError)
BTRE has quit [Quit: Leaving]
<rubyn00b>
So basically I want to open an IO to download the tarball, pass the IO to tar to read the list of files in it, and each filename I print.
<rubyn00b>
But it's not clear from the docs how to specify the IO object as the stdin for the tar subprocess. According to the docs I think IO.popen should take spawn options, of which :in is one of them, but I think I'm getting some detail wrong.
<adam12>
rubyn00b: This looks familiar.
<rubyn00b>
Yeah, I was here a few days ago asking about this. I've gotten a little farther now =)
johnny56 has joined #ruby
<rubyn00b>
The following code does what I want to do, essentially: URI.open('https://dl.pstmn.io/download/latest/linux64').then { |io| Zlib::GzipReader.new io }.then { |io| Gem::Package::TarReader.new io }.each { |entry| puts entry.full_name }
<rubyn00b>
But there are times when I don't have access to native ruby functionality and I would like to know how to leverage the command line programs to do the same thing.
ellcs has quit [Ping timeout: 258 seconds]
<adam12>
rubyn00b: IO.popen('tar tvzf -', :in=>io) works for me.
<rubyn00b>
Oh! You removed the mode.
<adam12>
rubyn00b: Did you need it?
<rubyn00b>
Yes, it works for me now.
<adam12>
Be nice if Ruby raised in that situation but maybe it _can_ work in some scenarios.
<rubyn00b>
Honestly I'm not sure what the mode does. I know I need to read from the stdout and write to the stdin, so I thought I needed to specify it as r+.
GodFather has joined #ruby
<rubyn00b>
I copied it from an example, thinking it couldn't hurt to specify the mode as r+.
<rubyn00b>
But I thought wrong =\
<adam12>
I feel like that section of docs could use more examples.
<rubyn00b>
Yeah, I kept bouncing between IO, Open3, Kernel::spawn, and still couldn't figure it out.
<rubyn00b>
But thank you very much adam12!
r29v has quit [Quit: r29v]
<adam12>
rubyn00b: No prob!
ellcs has joined #ruby
dualfade has quit [Ping timeout: 240 seconds]
<adam12>
wild_buffalo: Yes; Metasplot3 is a _subclass_ of Msf::Exploit::Remote. It's a form of inheritance.
<adam12>
wild_buffalo: Oh. Actually, I see you have a different angle bracket. Hmm.
<adam12>
That can't be valid.
<adam12>
&>> class Foobar > String; end
dualfade has joined #ruby
<adam12>
wild_buffalo: class Metasploit3 > Msf::Exploit::Ruby isn't valid Ruby. Is it possible that the line is wrong to sabotage the file from being run as-is?
dasher00 has quit [Ping timeout: 258 seconds]
howdoi has joined #ruby
johnny56 has quit [Ping timeout: 256 seconds]
IRC-Source_37 has joined #ruby
johnny56 has joined #ruby
GodFather has quit [Ping timeout: 256 seconds]
johnny56 has quit [Ping timeout: 258 seconds]
ellcs has quit [Ping timeout: 265 seconds]
BTRE has joined #ruby
greypack has joined #ruby
nakilon has quit [Ping timeout: 246 seconds]
johnny56 has joined #ruby
greengriminal has quit [Ping timeout: 265 seconds]
mangoicedtea has joined #ruby
drincruz has quit [Ping timeout: 240 seconds]
duderonomy has joined #ruby
Rudd0^ has quit [Ping timeout: 244 seconds]
nakilon has joined #ruby
Milos_ has joined #ruby
Milos has quit [Ping timeout: 246 seconds]
SeepingN has joined #ruby
nakilon has quit [Ping timeout: 240 seconds]
nakilon has joined #ruby
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]