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>
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.
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