adam12 changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.0.2, 2.7.4, 2.6.8: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
Inline has joined #ruby
Starfoxxes has quit [Ping timeout: 245 seconds]
Starfoxxes has joined #ruby
kaivai has quit [Quit: ZNC - https://znc.in]
kaivai has joined #ruby
ollysmith_ has quit [Ping timeout: 260 seconds]
ollysmith has joined #ruby
ged has quit [Read error: Connection reset by peer]
mahlon has quit [Ping timeout: 244 seconds]
mahlon has joined #ruby
ged has joined #ruby
fredlinhares has quit [Quit: WeeChat 2.8]
Rounin has quit [Ping timeout: 260 seconds]
Inline has quit [Ping timeout: 240 seconds]
skered has joined #ruby
<skered> Can you not limit gem upgrade to just user-install gems?
<skered> update rather.
<skered> Or an gem command...
<havenwood> skered: You mean user installed as opposed to those that ship with Ruby?
<skered> Or system installed.
<skered> Maybe they shipped with ruby.
<havenwood> skered: I can't think of any `gem update` command flags but you could probably use Gem in Ruby to get at the list you're meaning to update.
<havenwood> skered: For example, here I grab all gem names then remove the default gems: Gem::Specification.all_names - Gem::Specification.load_defaults.flat_map { |default| Dir.chdir(default) { Dir.children('.').map { |child| File.basename(child, '.gemspec') } }
<havenwood> Might be a more elegant way to do that but one isn't coming to me.
<havenwood> skered: Why?
<havenwood> You could get an explicit list of what you want to update, then either shell out to `gem` or just also update them within Ruby with Gem.
<skered> Can a gem name have a - in it?
<skered> Seems like I could just use the filesystem for the list.
<havenwood> Yup.
<skered> blah
<skered> ~/.gem/ruby/*/gems/
<havenwood> In IRB try running: Gem::Specification.load_defaults.flat_map { |default| Dir.chdir(default) { Dir.children('.').map { |child| File.basename(child, '.gemspec') } }
<havenwood> I'm just doing that.
<havenwood> If you want, you can `child.rpartition('-').first` or use regex instead. I left the `-version` since RubyGems understands the version but easy to strip it.
<havenwood> You can't have a number following a dash and the final dash is always trailed by a version, so you can get at the name easy enough.
<havenwood> skered: I'd suggest updating the default gems. They're meant to be updated. Why pin them? Also, pin them.
<havenwood> One of the big reasons to ship gems is that security fixes and bug fixes can be made in stdlib without replacing your entire Ruby.
<havenwood> I'm skeptical of not updating them. Why?
<skered> Because they're part of the system so I'd rather not mess with them.
<havenwood> They're intentionally meant to be updated. Those that go beyond intention will refuse to install.
<skered> This is macOS so I'm not going to touch them.
<skered> So I might install ruby via macports instead.
<havenwood> Maybe avoid system Ruby entirely and install a Ruby to play with yourself. Most of us go that route, yeah, good call.
<skered> That was another option as well.
<havenwood> Macports Ruby will play nice alongside system Ruby without interfering. Many of us need multiple Rubies so we use chruby, rbenv, or RVM to switch between them.
<havenwood> Macports and Brew Rubies play nice alongside chruby/rbenv/RVM too so you don't have to pick just one way.
<skered> However, I would leave gem updates to macports.
<skered> I like to keep system, alt. system (/opt ex: macports), and user installed stuff to the user.
mdemo has quit [Quit: The Lounge - https://thelounge.github.io]
<havenwood> skered: here's an example of Homebrew with chruby, but chruby works with Macports just the same: https://gist.github.com/havenwood/ba31f67c1d89ac236400
<havenwood> then you can `chruby system` and have it detect .ruby-version files if you want to auto-switch to the right Ruby version.
<havenwood> Or just plain 'ole Macports and toggling yourself works fine!
<skered> I would almost be alright with ignoring all system gems...
<skered> Ok so I think maybe using rvm or rbenv.
ur5us has quit [Ping timeout: 264 seconds]
polishdu1 has quit [Quit: leaving]
lunarkitty has joined #ruby
jpw has joined #ruby
vit has joined #ruby
jpw has quit [Remote host closed the connection]
_ht has joined #ruby
jtdowney has quit [Quit: Bye]
jtdowney has joined #ruby
jpw has joined #ruby
jpw has quit [Remote host closed the connection]
_ht has quit [Remote host closed the connection]
ur5us has joined #ruby
Rounin has joined #ruby
vit has quit [Quit: Konversation terminated!]
factor6 has joined #ruby
factor has quit [Ping timeout: 250 seconds]
factor6 is now known as factor
jpw has joined #ruby
hololeap has quit [Ping timeout: 276 seconds]
lunarkitty has quit [Quit: Connection closed for inactivity]
gregoryloscombe has joined #ruby
berkhan has joined #ruby
jpw has quit [Remote host closed the connection]
lunarkitty has joined #ruby
TomyWork has joined #ruby
gregoryloscombe has quit [Ping timeout: 264 seconds]
gregoryloscombe has joined #ruby
berkhan has quit [Ping timeout: 256 seconds]
<ox1eef_> my recommendation would be chruby, i use that and compile rubie(s) by hand.
dohtem has quit [Quit: Connection closed for inactivity]
pwnd_sfw1 has joined #ruby
pwnd_sfw has quit [Ping timeout: 245 seconds]
pwnd_sfw1 is now known as pwnd_sfw
hololeap has joined #ruby
benjaminwil has quit [Quit: quitting.]
benjaminwil has joined #ruby
Edward123 is now known as EdwardIII
gregoryloscombe has quit [Quit: WeeChat 3.2]
hololeap has quit [Remote host closed the connection]
hololeap has joined #ruby
_nightw0lf has joined #ruby
___nightw0lf has joined #ruby
_nightw0lf has quit [Quit: leaving]
___nightw0lf has quit [Remote host closed the connection]
_nightw0lf has joined #ruby
_nightw0lf has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 240 seconds]
roadie has joined #ruby
Jonopoly has joined #ruby
BinaryVixen899 has quit [Read error: Connection reset by peer]
berkhan has joined #ruby
hololeap has quit [Read error: Connection reset by peer]
hololeap has joined #ruby
Qchmqs has joined #ruby
lunarkitty has quit [Quit: Connection closed for inactivity]
berkhan has quit [Ping timeout: 268 seconds]
duds- has quit [Remote host closed the connection]
berkhan has joined #ruby
duds- has joined #ruby
berkhan has quit [Quit: Leaving for now. See you next time.]
berkhan has joined #ruby
berkhan has quit [Ping timeout: 256 seconds]
BSaboia has joined #ruby
Qchmqs1 has joined #ruby
Qchmqs has quit [Ping timeout: 245 seconds]
Qchmqs1 is now known as Qchmqs
justCity is now known as justache
Hess has quit [Quit: Hess]
Inline has joined #ruby
Jonopoly has quit [Quit: WeeChat 3.0]
ua_ has quit [Read error: Connection reset by peer]
ua_ has joined #ruby
Andrew_ has joined #ruby
AndrewYu has quit [Read error: Connection reset by peer]
dohtem has joined #ruby
Pixi_ has joined #ruby
Pixi has quit [Ping timeout: 256 seconds]
yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
yxhuvud has joined #ruby
Qchmqs has quit [Ping timeout: 246 seconds]
leonthemisfit has quit [Read error: Connection reset by peer]
leonthemisfit has joined #ruby
leonthemisfit has quit [Changing host]
leonthemisfit has joined #ruby
duds- has quit [Quit: Leaving.]
duds- has joined #ruby
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
berkhan has joined #ruby
weaksauce has quit [Quit: Textual IRC Client: www.textualapp.com]
jpw has joined #ruby
weaksauce has joined #ruby
rapha is now known as Vapha
Vapha is now known as rapha
pgib has joined #ruby
howdoi has joined #ruby
justache has quit [Read error: Connection reset by peer]
justache has joined #ruby
berkhan has quit [Remote host closed the connection]
berkhan has joined #ruby
Inline has quit [Ping timeout: 250 seconds]
berkhan has quit [Ping timeout: 240 seconds]
___nick___ has joined #ruby
lunarkitty has joined #ruby
berkhan has joined #ruby
pgib has quit [Quit: 00 PC LOAD LETTER]
Bounga has joined #ruby
hololeap has quit [Remote host closed the connection]
hololeap has joined #ruby
ur5us has joined #ruby
hololeap has quit [Read error: Connection reset by peer]
hololeap has joined #ruby
Bounga has quit [Remote host closed the connection]
jpw has quit [Remote host closed the connection]
berkhan has quit [Ping timeout: 246 seconds]
darkxploit has joined #ruby
darkxploit has quit [Remote host closed the connection]
Bounga has joined #ruby
Guest54 has joined #ruby
Guest54 has quit [Client Quit]
___nick___ has quit [Ping timeout: 256 seconds]
BSaboia has quit [Quit: This computer has gone to sleep]
Bounga has quit [Ping timeout: 240 seconds]
nmollerup has quit [Ping timeout: 240 seconds]
nmollerup has joined #ruby
va5c0 has joined #ruby
lunarkitty has quit [Quit: Connection closed for inactivity]
sagax has quit [Quit: Konversation terminated!]
michigan has joined #ruby
libsys has joined #ruby
<libsys> hey :) people... could I load a config file that contains a simple ruby array instead of a json/yaml config file?
<libsys> how?
<leftylink> well, if we are understanding that any arbitrary ruby code would be possible in the config file and all the implications of that, then of any of the usual ways to load a ruby file (`load` or `require` or `require_relative`) would be how.
<leftylink> it's worth emphasising that any arbitrary Ruby code would be possible.
finsternis has joined #ruby
<libsys> right
<libsys> hmm... I would need to assign it to a variable then
<libsys> it would be the same as eval to the contents of the file indeed
tkonto has joined #ruby
sagax has joined #ruby
va5c0 has quit [Quit: WeeChat 3.3]
vit has joined #ruby
lunarkitty has joined #ruby
<havenwood> libsys: Check out a apeiros' LiteralParser gem. https://github.com/apeiros/literal_parser
<havenwood> FWIW, if you're into eval of arbitrary code in CRuby this is another way: RubyVM::InstructionSequence.compile_file(filename).eval
<havenwood> Might as well just read the file and eval it with the portable API.