ResidentBiscuit has quit [Ping timeout: 255 seconds]
Ropeney has joined #ruby
<zenspider>
matthewd: I disagree with your advice to not test private methods. Sometimes you really need to. I suggest making them public in the test file so you don't need send
jphase has joined #ruby
idefine has quit [Remote host closed the connection]
jphase_ has joined #ruby
Rodya_ has quit [Remote host closed the connection]
jxv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
imode has joined #ruby
__Yiota has joined #ruby
jphase has quit [Ping timeout: 252 seconds]
jphase has joined #ruby
hutch34 has quit [Ping timeout: 252 seconds]
jphase_ has quit [Ping timeout: 252 seconds]
duckpuppy has quit [Ping timeout: 240 seconds]
jphase has quit [Ping timeout: 252 seconds]
Technodrome has joined #ruby
hutch34 has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
whippythellama has joined #ruby
jameser has joined #ruby
cosimou has quit [Ping timeout: 248 seconds]
hutch34 has quit [Ping timeout: 255 seconds]
cosimo_ has joined #ruby
jphase has joined #ruby
hutch34 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
thomasv314 has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Quit: inabit. zz.]
uZiel has joined #ruby
hutch34 has quit [Ping timeout: 255 seconds]
d^sh has quit [Ping timeout: 248 seconds]
d^sh has joined #ruby
rhyselsmore has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
uZiel has quit [Ping timeout: 248 seconds]
hutch34 has joined #ruby
wnd has quit [Ping timeout: 240 seconds]
jxv has joined #ruby
wnd has joined #ruby
mim1k has joined #ruby
hutch34 has quit [Ping timeout: 252 seconds]
govg has quit [Ping timeout: 260 seconds]
Ropeney has joined #ruby
Ropeney has quit [Client Quit]
sepp2k has quit [Quit: Leaving.]
mim1k has quit [Ping timeout: 240 seconds]
thomasv314 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch34 has joined #ruby
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
govg has joined #ruby
jxv_ has joined #ruby
jxv has quit [Ping timeout: 252 seconds]
hutch34 has quit [Ping timeout: 246 seconds]
__Yiota has joined #ruby
idefine has joined #ruby
govg has quit [Ping timeout: 246 seconds]
alfiemax has joined #ruby
govg has joined #ruby
gizmore|2 has joined #ruby
hutch34 has joined #ruby
thomasv314 has joined #ruby
gizmore has quit [Ping timeout: 240 seconds]
Cohedrin_ has quit [Read error: Connection reset by peer]
govg has quit [Ping timeout: 246 seconds]
alnewkirk has joined #ruby
hutch34 has quit [Ping timeout: 264 seconds]
bruno- has joined #ruby
Cohedrin_ has joined #ruby
Devalo has joined #ruby
nowhereman has quit [Read error: Connection reset by peer]
nowhereman has joined #ruby
alnewkirk has quit [Ping timeout: 252 seconds]
hutch34 has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
hutch34 has quit [Ping timeout: 240 seconds]
alfiemax has quit [Ping timeout: 260 seconds]
orbyt_ has joined #ruby
alfiemax has joined #ruby
hutch34 has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
jameser has quit [Ping timeout: 255 seconds]
gusrub has quit [Remote host closed the connection]
gusrub has joined #ruby
jameser has joined #ruby
hutch34 has joined #ruby
fullstack has quit [Ping timeout: 240 seconds]
ap4y2 has quit [Quit: WeeChat 1.9.1]
ap4y1 has joined #ruby
jameser has quit [Ping timeout: 240 seconds]
erlend has quit [Ping timeout: 240 seconds]
fullstack has joined #ruby
erlend has joined #ruby
hutch34 has quit [Ping timeout: 255 seconds]
Devalo has quit [Ping timeout: 252 seconds]
jameser has joined #ruby
kies has quit [Ping timeout: 258 seconds]
ap4y1 has quit [Ping timeout: 248 seconds]
hutch34 has joined #ruby
bambanx has quit [Quit: Leaving]
alex`` has joined #ruby
<zanoni>
question - I have a method with a conditional statement in it. I'd like that conditional to be optional. Is there a way to go about that? I tried a few things, assigning it to a proc and also a variable.
<Radar>
?gist zanoni
<ruby[bot]>
zanoni: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<Radar>
Show us your code, please.
<basket>
zanoni: Do you have some code to show?
<Radar>
basket: TOO SLOW
<basket>
I'm slow
<Radar>
:D
<zanoni>
I'll put it into a gist and pop the link, probably later, thanks!
hutch34 has quit [Ping timeout: 240 seconds]
ap4y1 has joined #ruby
xuanrui has joined #ruby
mjolnird has quit [Quit: Leaving]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch34 has joined #ruby
dviola has quit [Quit: WeeChat 1.9.1]
Rodya_ has quit [Remote host closed the connection]
oncall-pokemon has joined #ruby
hutch34 has quit [Ping timeout: 264 seconds]
alfiemax has quit [Remote host closed the connection]
duderonomy has joined #ruby
hutch34 has joined #ruby
Guest20488 has quit [Quit: Leaving]
hutch34 has quit [Ping timeout: 255 seconds]
gusrub has quit [Remote host closed the connection]
whippythellama has quit [Quit: WeeChat 1.4]
cschneid_ has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
hutch34 has joined #ruby
cschneid_ has quit [Ping timeout: 252 seconds]
zanoni has quit [Ping timeout: 240 seconds]
hutch34 has quit [Ping timeout: 240 seconds]
Freshnuts has joined #ruby
uZiel has joined #ruby
ap4y1 has quit [Quit: WeeChat 1.9.1]
tastytf has joined #ruby
hutch34 has joined #ruby
uneeb has joined #ruby
alfiemax has joined #ruby
shinnya has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
uneeb has quit [Read error: Connection reset by peer]
ap4y1 has joined #ruby
rajno has joined #ruby
rajnoT has quit [Ping timeout: 240 seconds]
ap4y has quit [Ping timeout: 248 seconds]
hutch34 has joined #ruby
gix has quit [Ping timeout: 260 seconds]
jrabe has quit [Ping timeout: 248 seconds]
gix has joined #ruby
jrabe has joined #ruby
hutch34 has quit [Ping timeout: 264 seconds]
Cohedrin_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
QualityAddict has quit [Quit: Leaving]
alfiemax has quit [Remote host closed the connection]
idefine has quit [Remote host closed the connection]
mim1k has joined #ruby
troys_ is now known as troys
kies has joined #ruby
troys is now known as troys_
troys_ is now known as troys
<matthewd>
zenspider: Ah, interesting
troys is now known as troys_
troys_ is now known as troys
mim1k has quit [Ping timeout: 248 seconds]
<matthewd>
"Don't.. but here's how" was certainly a nod to "sometimes you do need to" -- but having the test just 'fix' the visibility sounds much more pleasant when you do need to get intimate
ap4y1 has quit [Quit: WeeChat 1.9.1]
Cohedrin_ has joined #ruby
alex`` has quit [Ping timeout: 240 seconds]
quobo has quit [Quit: Connection closed for inactivity]
idefine has joined #ruby
idefine has quit [Ping timeout: 240 seconds]
anjen has joined #ruby
Xiti has quit [Quit: Xiti]
rabajaj has joined #ruby
govg has joined #ruby
Dimik has quit [Ping timeout: 240 seconds]
idefine has joined #ruby
Xiti has joined #ruby
eckhardt has joined #ruby
Rodya_ has joined #ruby
ap4y has joined #ruby
dkam has quit [Quit: Be back later ...]
idefine has quit [Ping timeout: 248 seconds]
dkam has joined #ruby
idefine has joined #ruby
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
dkam has quit [Ping timeout: 240 seconds]
idefine has quit [Ping timeout: 260 seconds]
Devalo has joined #ruby
rhyselsmore has joined #ruby
triston has joined #ruby
hutch34 has joined #ruby
triston has quit [Max SendQ exceeded]
triston has joined #ruby
triston has quit [Max SendQ exceeded]
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
triston has joined #ruby
triston has left #ruby [#ruby]
triston has joined #ruby
idefine has joined #ruby
triston has quit [Max SendQ exceeded]
uZiel has quit [Remote host closed the connection]
uZiel has joined #ruby
bruno- has quit [Ping timeout: 248 seconds]
mim1k has joined #ruby
quiller has quit [Ping timeout: 248 seconds]
bruno- has joined #ruby
alfiemax has joined #ruby
mim1k has quit [Ping timeout: 248 seconds]
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
hutch34 has quit [Ping timeout: 258 seconds]
idefine has quit [Remote host closed the connection]
oleo has quit [Quit: Leaving]
idefine has joined #ruby
Devalo has quit [Ping timeout: 248 seconds]
alfiemax has quit [Ping timeout: 240 seconds]
jxv_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cschneid_ has quit [Ping timeout: 255 seconds]
ramfjord has quit [Ping timeout: 248 seconds]
xuanrui has joined #ruby
dkam has joined #ruby
ramfjord has joined #ruby
mtkd has joined #ruby
anisha has joined #ruby
dinfuehr has quit [Ping timeout: 248 seconds]
dkam has quit [Ping timeout: 252 seconds]
dinfuehr has joined #ruby
anisha has quit [Read error: Connection reset by peer]
anisha_ has joined #ruby
ramfjord has quit [Ping timeout: 252 seconds]
ozcanesen has quit [Quit: ozcanesen]
cschneid_ has joined #ruby
apeiros_ has quit [Remote host closed the connection]
milardovich has quit [Remote host closed the connection]
apeiros_ has joined #ruby
milardovich has joined #ruby
djbkd has joined #ruby
cschneid_ has quit [Ping timeout: 258 seconds]
apeiros_ has quit [Ping timeout: 248 seconds]
milardovich has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fclausen has quit [Ping timeout: 248 seconds]
jxv has joined #ruby
konsolebox has joined #ruby
conta has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_aeris_ has quit [Ping timeout: 248 seconds]
DTZUZO has quit [Ping timeout: 248 seconds]
Immune has quit [Ping timeout: 248 seconds]
Xiti has quit [Read error: Connection reset by peer]
Xiti has joined #ruby
jxv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_aeris_ has joined #ruby
CrazyEddy has joined #ruby
Technodrome has joined #ruby
CrazyEddy has quit [Ping timeout: 240 seconds]
cdg has joined #ruby
CrazyEddy has joined #ruby
andikr has joined #ruby
cschneid_ has joined #ruby
alex`` has joined #ruby
cdg has quit [Ping timeout: 252 seconds]
bruno- has quit [Ping timeout: 240 seconds]
ap4y has quit [Quit: WeeChat 1.9.1]
hutch34 has joined #ruby
cschneid_ has quit [Ping timeout: 252 seconds]
hs366 has joined #ruby
madbytes has joined #ruby
apeiros_ has joined #ruby
hutch34 has quit [Ping timeout: 252 seconds]
<madbytes>
I'm getting the error "Bundler could not find compatible versions for gem 'ruby'". The gemfile says it needs > 2.2.0 but when i do "ruby -v" i already have ruby 2.3.5p376.
<madbytes>
where is the bundler command looking for the ruby gem :
<madbytes>
:/
alfiemax has quit [Remote host closed the connection]
ioggstream has joined #ruby
Hexafox[I] has joined #ruby
hutch34 has joined #ruby
dkam has joined #ruby
hutch34 has quit [Ping timeout: 258 seconds]
alex`` has quit [Quit: WeeChat 1.9.1]
djbkd has quit []
hutch34 has joined #ruby
<matthewd>
madbytes: Check you're using the latest bundler
<madbytes>
matthewd: Bundler version 1.16.0.pre.3
<matthewd>
Hmm.. I was hoping an upgrade might at least get us a better error
hutch34 has quit [Ping timeout: 246 seconds]
claudiuinberlin has joined #ruby
<matthewd>
Does the Gemfile say it needs > 2.2, or does it say it needs 2.2?
<ruby[bot]>
madbytes: 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
<matthewd>
xco: Hash inherits Object
cdg has joined #ruby
<matthewd>
madbytes: `bundle env` to make sure you're running the ruby version you think you are
<matthewd>
madbytes: That "ruby" gem looks unfamiliar, and maybe relevant?
blackmesa1 has quit [Ping timeout: 252 seconds]
<madbytes>
matthewd: ahh, i'm not running the ruby version i need. how do i change it? i've a .ruby_version file on the folder with the correct updated version.
<madbytes>
i also got rbenv installed, if thats an help.
djbkd has joined #ruby
<matthewd>
Check `gem env`
<matthewd>
If that's right and just bundler is wrong, `gem install bundler` should fix it
<madbytes>
nah, even gem env shows older version
<madbytes>
i've 2.4.2 installed on the system
<matthewd>
What about `ruby -v`?
mjolnird has joined #ruby
cdg has quit [Ping timeout: 252 seconds]
<madbytes>
matthewd: zsh: command not found: ruby :s
Devalo has joined #ruby
Devalo has quit [Remote host closed the connection]
<matthewd>
Well thar's yer problem ;)
Devalo has joined #ruby
<matthewd>
Either rbenv isn't active, or is trying to defer to system ruby, or.. something?
djbkd has quit [Client Quit]
<madbytes>
okay now i get ruby 2.0.0 on "ruby -v".
<madbytes>
but still not the version i want
Cohedrin_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<matthewd>
`rbenv versions` ?
<madbytes>
it shows "* 2.4.2 (set by /usr/local/share/metasploit-framework/.ruby-version)"
<madbytes>
i installed 2.4.2 via "rbenv install" command.
<madbytes>
rbenv didn't show me the 2.0.0 version, though.
<ioggstream>
respect to a minimal one file:/etc/hosts
<matthewd>
The very section of the spec that you quoted inline states: the "file" URI scheme is defined so that no authority [means] the end-user's machine
cschneid_ has joined #ruby
<ioggstream>
I'm not saying that file:/etc/hosts is broken, rather that is not the prevalent serialization of file uri
<matthewd>
So any implementation mis-parsing file:/etc/hosts is non-conformant
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
im0nde has joined #ruby
tcopeland has quit [Quit: tcopeland]
hutch34 has joined #ruby
ur5us has quit [Remote host closed the connection]
<matthewd>
You're saying it should use the traditional form because "other languages expect" it
maattdd has joined #ruby
cschneid_ has quit [Ping timeout: 258 seconds]
<ioggstream>
matthewd: not really, it's because it's the "most common format is use today"
<ioggstream>
the ability to confront serialized and deserialized uri between different languages is a bonus to me
hutch34 has quit [Ping timeout: 246 seconds]
<matthewd>
You've made a bug report, showing that you consider the current behaviour to be unexpected, and identifying a "fix". That sure sounds like a claim of brokenness to me.
<ioggstream>
matthewd: can I change that request to be an enhancement ;) ?
xco has quit [Ping timeout: 246 seconds]
<ioggstream>
marked feature
GodFather has joined #ruby
<ioggstream>
matthewd: do you think "misc is better?"
<matthewd>
I'd be more concerned with the body, tbh -- instead of claiming/implying the current behaviour is in some way wrong, yes contrast it with your suggested behaviour, but focus on why that would be desirable
<matthewd>
"Its values might be string-equal with other-implementation-X" doesn't seem terribly compelling to me, but it's not my call
milardovich has quit [Remote host closed the connection]
hutch34 has joined #ruby
<ioggstream>
matthewd: ok, I'm modifying the ticket. Thank you very much for your time! Further feedback is very welcome too :D
milardovich has joined #ruby
xco has joined #ruby
DTZUZO has joined #ruby
cabotto has joined #ruby
<ioggstream>
matthewd: I'll change the ticket with the following requisite: URI(uri_s).to_s == uri_s that imho is reasonable
hutch34 has quit [Ping timeout: 255 seconds]
<ioggstream>
is that fine for you?
milardovich has quit [Ping timeout: 255 seconds]
Devalo has joined #ruby
Devalo has quit [Remote host closed the connection]
<ioggstream>
and it may improve interoperaability tests (which usually rely on string comparison)
<matthewd>
Counter-argument: they said "in use today", implying they anticipate some probability of that situation changing
alfiemax has joined #ruby
alex`` has quit [Quit: WeeChat 1.9.1]
<matthewd>
... and I just now realised that the commenter on your bug report *is* "they"
Devalo has quit [Ping timeout: 252 seconds]
<ioggstream>
matthewd: "they" actually wrote that appendix-B ;)
<morfin>
i did not know there is RFC for that path
<matthewd>
Yeah. Which makes his statement that there's no recognised canonical representation pretty... canonical.
xco has quit [Ping timeout: 255 seconds]
alex`` has joined #ruby
Devalo has joined #ruby
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
<apeiros_>
"I just now realised that the commenter on your bug report *is* "they [RFC author]" 😅
apeiros_ is now known as apeiros
<apeiros>
friggin tail! begone!
alfiemax has quit [Remote host closed the connection]
Devalo has quit [Ping timeout: 248 seconds]
Heero__ has quit [Quit: Connection closed for inactivity]
xco has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xco has quit [Ping timeout: 260 seconds]
Devalo has joined #ruby
bigkevmcd has quit [Quit: Outta here...]
xco has joined #ruby
bruno- has quit [Ping timeout: 248 seconds]
tastytf has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Devalo has quit [Ping timeout: 248 seconds]
bruno- has joined #ruby
alfiemax has joined #ruby
xco has quit [Ping timeout: 240 seconds]
xco has joined #ruby
xco has quit [Ping timeout: 240 seconds]
tcopeland has joined #ruby
cabotto has joined #ruby
alfiemax has quit [Remote host closed the connection]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xco has joined #ruby
Burgestrand has quit [Quit: Closing time!]
<dminuoso>
apeiros the sorcerer.
xco has quit [Ping timeout: 240 seconds]
<dminuoso>
I played that game.
nadir has quit [Quit: Connection closed for inactivity]
xco has joined #ruby
aloy has quit [Quit: WeeChat 1.9.1]
__Yiota has joined #ruby
HTTP_____GK1wmSU has joined #ruby
aloy has joined #ruby
xco has quit [Ping timeout: 246 seconds]
HTTP_____GK1wmSU has left #ruby [#ruby]
rgr_ has quit [Quit: rgr_]
xco has joined #ruby
milardovich has joined #ruby
aloy has quit [Quit: WeeChat 1.9.1]
xco has quit [Ping timeout: 240 seconds]
zautomata has joined #ruby
aloy has joined #ruby
tvw has joined #ruby
synthroid has joined #ruby
milardovich has quit [Ping timeout: 248 seconds]
jxweng has joined #ruby
blackmesa1 has joined #ruby
jxweng has quit [Client Quit]
xco has joined #ruby
xco has quit [Ping timeout: 240 seconds]
zautomata has quit [Ping timeout: 248 seconds]
Devalo has joined #ruby
xco has joined #ruby
jottr has joined #ruby
John___ has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fclausen has joined #ruby
ferr1 has joined #ruby
scorpiosec has joined #ruby
xco has quit [Ping timeout: 240 seconds]
Devalo has quit [Ping timeout: 255 seconds]
ldepandis has joined #ruby
cabotto has quit [Remote host closed the connection]
cabotto has joined #ruby
ramfjord has joined #ruby
schaary has joined #ruby
fclausen has quit [Ping timeout: 248 seconds]
Devalo has joined #ruby
__Yiota has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
<schaary>
how can I compute the first day of the last month?
xco has joined #ruby
Devalo has quit [Ping timeout: 248 seconds]
Braindead has joined #ruby
Bacta has joined #ruby
<Bacta>
Anyone know what the situation is with FactoryGirl? Are there any forks available? I don't want to start referring to it as FactoryBot.
Braindead has quit [Ping timeout: 252 seconds]
<latemus>
i followed the example for readline history blank-line exclusion as shown in the docs here ==> ruby-doc.org/stdlib-1.9.3/libdoc/readline/rdoc/Readline.html but the code from the example breaks history altogether, here's my code ==> http://termbin.com/3xxt
<apeiros>
schaary: last month of what? or last = previous?
enterprisey has quit [Remote host closed the connection]
<morfin>
how do you think would it be better to write parser with Ruby instead of let's say PHP? Nokogiri + Faradey + HTTPClient(as backend for Faradey) + maybe something else
claudiuinberlin has joined #ruby
uZiel has joined #ruby
shinnya has quit [Ping timeout: 255 seconds]
uZiel has quit [Remote host closed the connection]
fclausen has quit [Ping timeout: 248 seconds]
prutheus has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<prutheus>
Hey. I have following code, which uses an eval function but this is not good. How to change this code to not use eval?
<matthewd>
prutheus: It sounds like the contents of 'args' is expecting to be evaled
<prutheus>
it must be sssssssolved like that, right?
<matthewd>
I don't know where args is coming from, or how it's being constructed
GodFather has quit [Ping timeout: 260 seconds]
Devalo has quit [Remote host closed the connection]
<Harzilein>
prutheus: i think mean something like indicator_hnd.run *(args.take_while { |e| !e.empty? }.map{ |e| e.to_s })
<Harzilein>
+you
ferr1 has quit [Quit: WeeChat 1.9.1]
<Harzilein>
oh, wait
<Harzilein>
hmm
<matthewd>
It's more like `indicator_hnd.run(*args.map {|v| eval(v.to_s) })` -- which doesn't particularly improve the situation
mikecmpbll has quit [Ping timeout: 246 seconds]
<Harzilein>
yeah, i get that now
<Harzilein>
it's slightly more sane to read
Beams has quit [Quit: .]
<Harzilein>
i had a similar special thing in a templating context, i just made a parser for the expected ruby subset
<matthewd>
The real question is whether args needs the eval at all, or whether this is purely a super-convoluted way to hand-implement a splat
<Harzilein>
if those args are just strings with variable names in them, there's an easier way of course
<Harzilein>
prutheus: can you explain your actual intent a bit more?
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sidoniuns has quit [Quit: Leaving]
mim1k has quit [Ping timeout: 258 seconds]
mfb2 has joined #ruby
vstemen has left #ruby ["Leaving"]
mson has quit [Quit: Connection closed for inactivity]
z64 has joined #ruby
orbyt_ has joined #ruby
mfb2 has quit [Client Quit]
mark_66 has quit [Remote host closed the connection]
<tyil>
Im trying to run jekyll in a docker container, but I get the error "jekyll 3.5.2 | Error: Permission denied @ rb_sysopen - /dev/core"; would anyone have some info on why it does this and how to solve it?
uZiel has joined #ruby
guille-moe has quit [Ping timeout: 252 seconds]
ramfjord has joined #ruby
dviola has quit [Quit: WeeChat 1.9.1]
Nicmavr has joined #ruby
Nicmavr is now known as Guest5410
fantazo has joined #ruby
thomasv314 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jxv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SeepingN has joined #ruby
<matthewd>
tyil: That really sounds like an OS-level issue
thomasv314 has joined #ruby
marxarelli|afk is now known as marxarelli
<tyil>
yes it does
<matthewd>
tyil: Maybe try strace?
<tyil>
I guess I could strace from within the docker container
<matthewd>
Yeah. I think it's going to be a "docker doesn't have access to $X" issue, where $X is some low level thing... but I consequently have no idea on the details.
zautomata has joined #ruby
skydiver has quit [Quit: WeeChat 1.9.1]
alnewkirk has joined #ruby
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ikopico>
Hello, can anyone please share a snippet for running executable scripts on a host over SSH using net/ssh's channels?
selim has quit [Ping timeout: 260 seconds]
jxv has joined #ruby
<matthewd>
ikopico: What do you have so far?
workmad3 has quit [Quit: Lost terminal]
selim has joined #ruby
andikr has quit [Remote host closed the connection]
Guest5410 has quit [Changing host]
Guest5410 has joined #ruby
Guest5410 is now known as Kestrel-029
milardovich has joined #ruby
jgt has quit [Ping timeout: 246 seconds]
BTRE has quit [Quit: Leaving]
rajno has quit [Ping timeout: 252 seconds]
Cohedrin_ has joined #ruby
Cohedrin_ has quit [Read error: Connection reset by peer]
milardovich has quit [Remote host closed the connection]
Cohedrin_ has joined #ruby
milardovich has joined #ruby
ShekharReddy has quit [Quit: Connection closed for inactivity]
ronenshvayg has joined #ruby
kapil___ has joined #ruby
<ronenshvayg>
:wave:
<havenwood>
o/
alnewkirk has quit [Ping timeout: 260 seconds]
<ronenshvayg>
Can anyone please share a snippet for running a script (any executable) using Net::SSH's channels and getting the output?
ramfjord has quit [Remote host closed the connection]
RedNifre has joined #ruby
<RedNifre>
Good evening!
jxv has joined #ruby
Dimik has joined #ruby
alex`` has joined #ruby
c_nick has joined #ruby
<RedNifre>
Say that you get two deliveries per month, say on the 12th and 26th (is it th?). How to best calculate a countdown in days for that? I can only think of clumsy solutions involving if statements at the month break.
<c_nick>
how can i call ruby on button click in sinatra ?
eckhardt has joined #ruby
LocaMocha has quit [Ping timeout: 248 seconds]
jenrzzz has joined #ruby
cdg has joined #ruby
fullstack has quit [Ping timeout: 246 seconds]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<baweaver>
RedNifre: clarify what you mean by countdown
<ruby[bot]>
baweaver: # => /tmp/execpad-ecb2b67264c2/source-ecb2b67264c2:2: trailing `_' in number ...check link for more (https://eval.in/886164)
<baweaver>
Anyways, basically that
<baweaver>
probably mad about 10_ago
alex`` has joined #ruby
c_nick has quit [Ping timeout: 264 seconds]
<RedNifre>
well, i don't see how it's related to my problem.
conta2 has quit [Quit: conta2]
<RedNifre>
...but i guess I'll go with the if statement at the month edge or maybe just substract the count of days this month if the current day is after the second date.
c_nick has joined #ruby
<apeiros>
Date is day based
<apeiros>
Date.civil(year, month, day) - Date.today # => days remaining
<RedNifre>
That technique would require three Date.civil, no?
<apeiros>
one per date you want a countdown for
<RedNifre>
You would need the two of the current month and the first of the next month, then substract Date.today and pick the first that isn't negative.
adlerdias has quit [Quit: adlerdias]
<RedNifre>
Meh, I'll just irb it out until I'm happy with the code...
ek926m has joined #ruby
<apeiros>
o0
<apeiros>
oh, I think I understand now
Neptu has quit [Ping timeout: 240 seconds]
<RedNifre>
apeiros it's not a difficult problem to solve, It's only difficult to solve it in an elegant way.
<apeiros>
you can use << 1 to move a Date by 1 month
<apeiros>
as long as it's not >28th day of the month, that should be unproblematic
Technodrome has joined #ruby
<RedNifre>
How to get the number of days in the current month?
VeryBewitching has joined #ruby
<apeiros>
have a lookup table (date might have one)
milardovich has quit [Remote host closed the connection]
<apeiros>
switch 28 to 29 if it's february and a leap year (Date#leap?)
<RedNifre>
how do I list the methods of something again in irb?
<apeiros>
.methods
<apeiros>
but use pry and the `ls` command
herbmillerjr has joined #ruby
<RedNifre>
huh?
c_nick has quit [Quit: ciaos]
ek926m has quit [Quit: Leaving]
ek926m has joined #ruby
enterprisey has joined #ruby
<apeiros>
pry is a replacement for irb
ek926m has quit [Remote host closed the connection]
<RedNifre>
ah, I'll look it up then.
<RedNifre>
Is there an FP style way to find the first non negative number in a list? like list.find(>= 0) or something short like that, or do I have to go with a block with a parameter like { |x| x >= 0 } ?
<havenwood>
RedNifre: &:negative?
orbyt_ has joined #ruby
* RedNifre
is pondering.
nadir has joined #ruby
<havenwood>
RedNifre: If you don't mind the inversion of: reject(&:negative?)
<RedNifre>
okay, so how do I get not negative? 0 is neither
<RedNifre>
ah!
<RedNifre>
nah, reject returns a list
<havenwood>
oh, you wanted first
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<RedNifre>
hm, I guess find(complement(&:negative?)) or something like that is no longer worth the hassle.
<havenwood>
RedNifre: find with a block
<havenwood>
RedNifre: sorry, i should have read what you were asking more carefully - you said it clearly
<RedNifre>
yeah, I'll go with the block, doing it point-free style isn't worth it it seems.
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tvw has quit [Remote host closed the connection]
knight33 has joined #ruby
jrafanie has joined #ruby
duckpuppy has quit [Ping timeout: 240 seconds]
anisha_ has quit [Quit: This computer has gone to sleep]
xuanrui has quit [Read error: Connection reset by peer]
haylon has quit [Changing host]
haylon has joined #ruby
Guest70354 has quit [Quit: WeeChat 1.9.1]
lxsameer has joined #ruby
thomasv314 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ruby[bot]>
eam: # => /tmp/execpad-990605aa3966/source-990605aa3966:2: unterminated string meets end of file ...check link for more (https://eval.in/886180)
Cohedrin_ has quit [Read error: Connection reset by peer]
<Papierkorb>
eam: it counts braces in the body. Use different kinds of braces instead: `%i[ ( ]`
<ruby[bot]>
eam: # => /tmp/execpad-a8e0f6fe803c/source-a8e0f6fe803c:2: unterminated string meets end of file ...check link for more (https://eval.in/886184)
<adaedra>
space is not alphanumeric, so it's working as delimitor
<eam>
that's what I mean
mathys has quit [Ping timeout: 255 seconds]
<eam>
it's a delimitor for % but not %i
<adaedra>
alphanums after % indicate the "kind" of % litteral
<Papierkorb>
>> %unicode sucks
<ruby[bot]>
Papierkorb: # => /tmp/execpad-e649038a04ba/source-e649038a04ba:2: invalid multibyte char (UTF-8) ...check link for more (https://eval.in/886186)
<ruby[bot]>
eam: # => /tmp/execpad-46f68f84af18/source-46f68f84af18:3: syntax error, unexpected keyword_rescue ...check link for more (https://eval.in/886189)
<jolamb>
you've obviously spotted the missing tests :(
<Papierkorb>
We're not gonna judge. but jeez
<adaedra>
I'm double sorry if you don't have tests
<adaedra>
First because what I said
cdg_ has joined #ruby
<adaedra>
Second because.... well, you don't have tests
|ifei5g00d has quit [Ping timeout: 255 seconds]
<adaedra>
(Maybe it's time to add some?)
<adaedra>
Is that the thing you have to refactor, jolamb?
jphase has quit [Remote host closed the connection]
<jolamb>
adaedra: yeah
<adaedra>
ooof
<jolamb>
it is Reliable Code that has Gotten Us This Far
<jolamb>
but....
milardovich has joined #ruby
hutch34 has quit [Ping timeout: 258 seconds]
<jolamb>
it's very modification-hostile
fclausen has joined #ruby
|ifei5g00d has joined #ruby
<adaedra>
It reminds me of PHP
<Papierkorb>
jolamb: Mh I think I'd start splitting that thing into partials. Just to have smaller chunks you can then (hopefully) easier refactor
cdg has quit [Ping timeout: 252 seconds]
<Papierkorb>
And then part by part pull things out, and do a few improvement passes until it's bearable overall
<adaedra>
There's way too much logic in this file
<jolamb>
adaedra: that's the dadgum truth
ta has joined #ruby
<Papierkorb>
Hence why I'd split that thing into partials first :P
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Papierkorb>
Doesn't improve the overall quality (or not by itself), but makes it more "consumable". Crazy code that fits on your screen is better than crazy code that doesn't
<adaedra>
But once you've refactored this big bad boy, your satisfaction levels will likely reach their maximum
rhyselsmore has quit [Ping timeout: 240 seconds]
<adaedra>
If you're looking at refactoring tools, I think RubyMine is the one that should give you the best, but even with that I wouldn't raise too many hopes
<adaedra>
It may help you with the split to partials phase
<jolamb>
adaedra: roger that
<adaedra>
stop calling me roger
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<adaedra>
Anyway, I wish you courage
<jolamb>
thanks
tvw has joined #ruby
ta has quit [Ping timeout: 255 seconds]
FastJack has joined #ruby
<jolamb>
adaedra: Papierkorb: any recommendations on unit-testing libraries for non-rails code?
<adaedra>
Papierkorb: I've seen code that fits in my screen many times that would terrify me
<adaedra>
rspec
<Papierkorb>
jolamb: I really liked rspec3 the most
<havenwood>
jolamb: minitest
thomasv314 has joined #ruby
<Papierkorb>
adaedra: Yeah I didn't say it made it good, but just more bearable to some extent, to let you focus a bit more. No doubt that you can create amazing shit code where that still doesn't help :P
orbyt_ has joined #ruby
<eam>
I wish the ruby builtin Process class allowed for more rich interactions
<eam>
like enumerating, parent/child relationships
<jolamb>
havenwood: why minitest over rspec3?
ldnunes has quit [Quit: Leaving]
<havenwood>
jolamb: It's already in the stdlib. It's simpler. It *just works*. It lets you combine test and spec styles as you wish. It's faster.
<jolamb>
havenwood: that all sounds pretty good
<jolamb>
downsides?
<Papierkorb>
less expressive
<Papierkorb>
Also the subject/let stuff with context/describe blocks is really great once you get the hang of it
Devalo has quit [Remote host closed the connection]
jxv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood>
eam: that's be really nice
<havenwood>
that'd**
ta has joined #ruby
thomasv3_ has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<eam>
I think it doesn't because it was written originally to wrap the posix libc interfaces and libc doesn't actually provide those things. But, you know, ruby could do better
<Papierkorb>
Process is a mess
<eam>
posix apis for interacting with processes are a mess
alex`` has quit [Quit: WeeChat 1.9.1]
thomasv314 has quit [Ping timeout: 258 seconds]
<eam>
here's a fun question that really upsets people: why is /bin/ps on your OSX laptop setuid root?
milardovich has quit [Read error: Connection reset by peer]
milardovich has joined #ruby
hutch34 has joined #ruby
<Papierkorb>
because their proc fs has funny permissions?
<eam>
does OSX have /proc?
<eam>
(so then, how does it work?)
<Papierkorb>
isn't that UNIX?
<eam>
nope
jxv has joined #ruby
<eam>
proc is a nonstandard thing and the unixes that do implement it generally do so differently
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
scorpiosec has joined #ruby
<adaedra>
No /proc on macOS
thomasv3_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<adaedra>
On FreeBSD, it exist but not mounted by default
kapil___ has quit [Quit: Connection closed for inactivity]
mozzarella has joined #ruby
biberu has quit []
<adaedra>
Just checked, if ps is not setuid under macOS there are some information it can't get about process of other users (CPU time, Mem usage, Time, Status, ...)
gil_ has joined #ruby
<adaedra>
(it's also seeable with other process monitors like htop which require root to work correctly)
<Papierkorb>
doesn't mac os use capabilities?
<adaedra>
I'm not sure it applies to single binaries
scorpiosec has quit [Quit: No Ping reply in 180 seconds.]
gusrub has quit [Remote host closed the connection]
morfin has quit []
scorpiosec has joined #ruby
milardovich has quit [Remote host closed the connection]
synthroid has quit []
bmurt has joined #ruby
Ropeney has joined #ruby
eckhardt has joined #ruby
<eam>
it looks like it uses entitlements
<eam>
I assumed it worked the way freebsd used to (open /dev/kmem and read it) but there's a lot more to it on osx
madbytes has quit [Quit: Connection closed for inactivity]
bvcosta has joined #ruby
marxarelli is now known as marxarelli|afk
hahuang65 has quit [Ping timeout: 258 seconds]
|ifei5g00d has quit [Ping timeout: 255 seconds]
ozcanesen has quit [Quit: ozcanesen]
[Butch] has quit [Quit: I'm out . . .]
jrafanie has quit [Ping timeout: 248 seconds]
|ifei5g00d has joined #ruby
orbyt_ has joined #ruby
alfiemax has joined #ruby
chouhoul_ has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has quit [Ping timeout: 252 seconds]
FrostCandy has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
chouhoulis has quit [Ping timeout: 240 seconds]
<FrostCandy>
I've been looking all over and cant figure this out - how do I post an array to a uri? Every example I've found fails. responce.body = {'d'=>['1','2','3']}.to_json for example fails. Anyone have an example that works ?
chouhoul_ has quit [Ping timeout: 248 seconds]
<elomatreb>
Depends on your encoding. JSON is simple, in x-www-form-urlencoded arrays look like d[]=1&d[]=2&d[]=3
troys is now known as troys_
Azure has joined #ruby
tcopeland has quit [Quit: tcopeland]
nofxx has joined #ruby
<FrostCandy>
do you have a http.post example I could look at ? I don't really knwo what you mean. are you saying the to_json method doesn't encode the same way all the time?
<FrostCandy>
currently im using the Net::HTTP.new
<FrostCandy>
but nothing works.
mim1k has joined #ruby
alfiemax has joined #ruby
aloy has quit [Ping timeout: 240 seconds]
nofxx has quit [Remote host closed the connection]
<apeiros>
FrostCandy: what he says is that it depends on how the service you call expects it
<apeiros>
there's more than one standard way to do it and there are infinite non-standard ways
GodFather has joined #ruby
aloy has joined #ruby
<FrostCandy>
Oh, ya I see, so there are several ways I could send it with ruby methods like URI.encode_www_form(params) vs something else and somethign else ?
|ifei5g00d has quit [Ping timeout: 260 seconds]
bruno- has joined #ruby
<apeiros>
yupp
mim1k has quit [Ping timeout: 258 seconds]
<FrostCandy>
ok, so is there a way i coudld puts out what I'm sending after encoding?
<FrostCandy>
oh nm i see
nofxx has joined #ruby
<FrostCandy>
Ok, do you know off hand what method woudl encode with id=1,2,3 instead of how URI.encode_www_form does it - id=1&id=2&id=3?
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
<FrostCandy>
if not i could write my own method for that i suppose
<elomatreb>
If you can get away with just using JSON for the transport like that, you should. (I think your issue earlier might have been that you didn't set the appropriate Content-Type on your request?)
alnewkirk has joined #ruby
safetypin has quit [Ping timeout: 248 seconds]
|ifei5g00d has quit [Ping timeout: 240 seconds]
bvcosta has quit [Remote host closed the connection]
alnewkirk has quit [Ping timeout: 240 seconds]
bvcosta has joined #ruby
bvcosta has quit [Read error: Connection reset by peer]
|ifei5g00d has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
<FrostCandy>
application/json was the content type. maybe there was a way to use a json string as a parameter, then break that down later.
<FrostCandy>
oh well sounds like a tomorrow job.
fullstack has quit [Ping timeout: 255 seconds]
FrostCandy has quit []
scorpiosec has joined #ruby
gusrub has quit [Remote host closed the connection]