henninb has quit [Remote host closed the connection]
jimeh is now known as jimeh__
ur5us_ has quit [Ping timeout: 244 seconds]
drincruz_ has joined #ruby
drincruz has quit [Ping timeout: 265 seconds]
lucerne has joined #ruby
ur5us_ has joined #ruby
gr33n7007h has joined #ruby
goldfish has quit [Ping timeout: 252 seconds]
Rakko has joined #ruby
lucerne has quit [Remote host closed the connection]
lucerne has joined #ruby
easbarbosa has joined #ruby
Tempesta has quit [Quit: See ya!]
jimeh has joined #ruby
jimeh__ has left #ruby [#ruby]
aesthetikx has quit [Ping timeout: 252 seconds]
jimeh has quit [Quit: Bridge terminating on SIGTERM]
jimeh has joined #ruby
jimeh has quit [Client Quit]
jimeh has joined #ruby
jimeh has quit [Client Quit]
jimeh has joined #ruby
jimeh has left #ruby [#ruby]
aesthetikx has joined #ruby
Tempesta has joined #ruby
Rakko has quit [Quit: Leaving]
justBull is now known as justK
drincruz has joined #ruby
drincruz_ has quit [Ping timeout: 258 seconds]
easbarbosa has quit [Ping timeout: 268 seconds]
lucerne has quit [Write error: Connection reset by peer]
jla has joined #ruby
drincruz_ has joined #ruby
drincruz has quit [Ping timeout: 258 seconds]
drincruz_ has quit [Ping timeout: 258 seconds]
jla has quit [Ping timeout: 258 seconds]
jla has joined #ruby
postmodern has quit [Quit: Leaving]
neshpion has quit [Quit: neshpion]
lucerne has joined #ruby
jla has quit [Ping timeout: 268 seconds]
lunarkitty has quit [Quit: Connection closed for inactivity]
drincruz_ has joined #ruby
ur5us_ has quit [Ping timeout: 244 seconds]
jla has joined #ruby
lunarkitty has joined #ruby
drincruz_ has quit [Ping timeout: 258 seconds]
jla has quit [Ping timeout: 252 seconds]
jla has joined #ruby
willthechill has quit [Ping timeout: 264 seconds]
cdolan has quit [Ping timeout: 258 seconds]
gearnode has joined #ruby
reset has quit [Quit: reset]
gr33n7007h has quit [Quit: WeeChat 3.2]
lzap has joined #ruby
<lzap>
hello guys, is there any way to nicely convert IPv6 address to hostname?
<lzap>
this is what I landed with and it is ugly: wrapped_ip = node_ip.ipv6? ? "[#{node_ip}]" : node_ip
lucerne has quit [Remote host closed the connection]
<lzap>
IPv6 needs to be enclosed in square brackets while IPv4 must be not, I was wondering if there is a method to do that in IPAddr for example, that would be useful
Furai has quit [Quit: WeeChat 3.2]
Furai has joined #ruby
drincruz_ has joined #ruby
drincruz_ has quit [Ping timeout: 258 seconds]
Furai has quit [Quit: WeeChat 3.2]
Furai has joined #ruby
aeris has quit [Ping timeout: 244 seconds]
leah2 has quit [Ping timeout: 240 seconds]
ur5us_ has joined #ruby
teclator has joined #ruby
splud has quit [Ping timeout: 272 seconds]
lucerne has joined #ruby
leah2 has joined #ruby
ur5us_ has quit [Remote host closed the connection]
aeris has joined #ruby
ur5us has joined #ruby
TomyWork has joined #ruby
ur5us has quit [Ping timeout: 244 seconds]
<jhass[m]>
I looked if URI handles this since that's what you're really building here probably, but unfortunately it does not :( https://carc.in/#/r/bep7 Arguably a bug IMO. So looks like for now you figured the best way
<adam12>
CoolerX: All gems used _must_ be in Gemfile. Bundler works by isolating the $LOAD_PATH to only include the specified Gems.
<adam12>
(just as an FYI)
<adam12>
oz: There's one from the eventide folk that is kind of nice. I use dry-validation but I love the simplicity of the eventide one. There's almost nothing to it. https://github.com/eventide-project/validate
<oz>
thanks adam12, I'll look into it. The other one I'm considering is soveran's scrivener. :)
<adam12>
oz: Oh yes. That one is good too :)
easbarbosa has quit [Ping timeout: 244 seconds]
<qunzhong_luxian>
That reminds me of a question I've been meaning to ask lately, has there been some paradigm shift where the Gemfile is used in creating a gem? If I run `bundle gem sample_gem` and then I run `cat sample_gem/Gemfile` I get `gem "rake", "~> 13.0` and `gem "rspec", "~> 3.0"` in the body of the Gemfile. I do have a ~/.bundle/config that specifies BUNDLE_GEM_TEST: 'rspec', but it still seems odd to me.
<qunzhong_luxian>
Previously if I had dev dependencies I wanted in my gem I'd put them in the gemspec file
<adam12>
qunzhong_luxian: I've moved to using Gemfile for all dev dependencies. Partly because I never remember the incantation to `gem` to install them for me :)
drincruz_ has joined #ruby
<adam12>
Not sure if there was a paradigm shift, but that's my reasoning.
<qunzhong_luxian>
Ooh thank you for finding that jimeh! :)
<jimeh>
no worries :)
<nakilon>
I don't use "bundle gem" at all
<nakilon>
build the gem file by file as you need them
<jimeh>
I tend to be lazy, but at the same time I also change a whole bunch of things in the skeleton generated by `bundle gem`, including just running `rubocop -A` against it to begin with... lol
involans has quit [Ping timeout: 258 seconds]
patrick has quit [Quit: WeeChat 3.0.1]
<qunzhong_luxian>
I feel like I'm 50/50 as to if I build it by hand or use bundle gem. Almost all of the files scaffolded are a bit annoying, but I hate writing my own gemspec. I definitely also run rubocop -A immediately
patrick has joined #ruby
<adam12>
I build by hand too. But one cannot forget the entire generation of gem builders (Jeweler, Hoe, etc).
<adam12>
For `bundle gem`, I never liked that it was a dependency of my gem. I think that's changed now.
<jimeh>
I also always get rid of the default `spec.files` which uses git to list all files committed to the repo, and instead use dir globbing to explicitly include files and patterns I know care about... just cause it's in git, doesn't mean it should be part of the *.gem...
<jimeh>
not to mention, about 10 years ago one gem repo I was working on, for some reason had the bundle build output `pkg` directory committed to git (I don't remember why, but I remember disagreeing with the reasoning), and the pkg folder was not added to the git list exclude pattern, so after enough new versions, we had a .gem file that was 32MB for a gem that consistent of around 1.5KB of actual Ruby code :D
CoolerX has joined #ruby
<CoolerX>
Hi
<adam12>
CoolerX: hi
<adam12>
jimeh: The `git spec` bit for files is actually a big issue for distro packagers.
<CoolerX>
anyone here use jekyll and github pages?
<CoolerX>
I am getting this error while trying to use the just-the-docs theme https://bpa.st/DK6A
<CoolerX>
I have a line in _config.yaml remote_theme: pmarsceill/just-the-docs
<adam12>
CoolerX: Maybe Github has it's own list of approved themes?
<jimeh>
CoolerX: it's been a while, so the `remote_theme` option is new to me, but potentially you can get some more info from here which seems to be what's used to pull in remote themes: https://github.com/benbalter/jekyll-remote-theme
xuochi has quit [Quit: leaving]
involans has joined #ruby
drincruz has joined #ruby
drincruz_ has quit [Ping timeout: 265 seconds]
cmnstr92 has joined #ruby
Hobbyboy has joined #ruby
Ziyan has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Ziyan has joined #ruby
gr33n7007h has joined #ruby
Garb00 has quit [Quit: Garb00]
cahoots has joined #ruby
<cahoots>
hi, is there a map function where if an object is nil, it just returns nil, otherwise it returns the result of a block being passed that object? e.g., "string".match(/\d/).nil_map { |match| match[1] }
<leftylink>
that would be filter_map wouldn't it?
<leftylink>
neve mind, no it's not
<leftylink>
I misread the question
<leftylink>
the result asked for can be achieved with map &.[](1) I guess
<leftylink>
wait
<leftylink>
no map there
<leftylink>
it's one thing
<leftylink>
so it's just &. applied to [] method.
cmnstr92 has quit [Quit: Client closed]
<leftylink>
for a most general block, I suppose &.then can be used
mrkz_c has quit [Quit: Connection closed for inactivity]
mrkz_c has joined #ruby
weaksauce has joined #ruby
goldfish has quit [Read error: Connection reset by peer]
goldfish has joined #ruby
ur5us has quit [Quit: Leaving]
ur5us has joined #ruby
crankharder has joined #ruby
cdolan has joined #ruby
kssm has quit [Quit: leaving]
cahoots has quit [Quit: leaving]
crankharder has quit [Quit: leaving]
crankharder has joined #ruby
<crankharder>
is there some `gem install bundler` flag/option that will install the version defined in Gemfile.lock's BUNDLED WITH section? Preferably without any sed/grep/awk acrobatics :) Thanks!