Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

who doesn't enjoy a rewrite #83

Merged
merged 56 commits into from
Apr 24, 2014
Merged

Conversation

wfarr
Copy link
Contributor

@wfarr wfarr commented Mar 10, 2014

Well, partial rewrite.

Big feature out of this one is support for chruby and rbenv, toggle-able via Hiera.

So not ready to merge yet, and still has a few bugs here and there (and everywhere).

## Breakages since last major version

* `ruby::global` does not work with chruby
* bundler is no longer installed by default in rubies
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was true when the README was last updated 😉

I'm working on some dirty hacks to make these "in-every-ruby" sort of gems not require hardcoding in the ruby::version class.

@wfarr
Copy link
Contributor Author

wfarr commented Mar 14, 2014

@dgoodlad the hiera-related spec failures here are super weird and hard to debug. Please look into them when you've got a chance.

@dgoodlad
Copy link
Contributor

@wfarr god. this again. It'll be a missing symlink. or something. Basically the module-data hiera stuff isn't loading at all in the specs. Trying to figure out wtf it's up to

@dgoodlad
Copy link
Contributor

The build is finally green on this branch!

Major changes since @wfarr originally opened this PR are

  • Merged in the crazy hacks from the damned-global-gem-shenanigans branch
  • Refactored those crazy hacks to be far more sane in 9c2d1a5
  • Fixed up all the specs
  • Made ensure => absent work for ruby::version, including aliases
  • Extracted the hardcoded bundler gem into a ruby::gems class, using the new ruby_version => '*' support

@wfarr @rafaelfranca I think it's time to give this PR another once-over

provider => 'shell',
cwd => "~/src/project",
require => [ Ruby::Gem["bundler for ${version}"], Package['zsh'] ]
exec { '/opt/rubies/2.1.0/bin/bundle install':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this even work? I would've expected the bundler environment to ruin everything (e.g. BUNDLER_GEMFILE). We might want to offer a custom gem_exec type?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm more of the mind that doing this sort of thing is a smell than anything, but if that floats your boat, gem_exec seems fine.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah me too; we'll leave it alone unless we need it.

…and-chruby-sittin-in-a-tree

Conflicts:
	lib/puppet/provider/rbenv_gem/rubygems.rb
	manifests/params.pp
	spec/classes/ruby_spec.rb
# Class: ruby::gems
#
# (INTERNAL) Installs global ruby gems
class ruby::gems {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should ship this as a default things for folks.

For better or worse, some folks really dislike Bundler (or name any gem really) and we're going to get the inevitable "why are you forcing this on me?"

I'd much rather just document this really well in the README as the way to handle this sort of thing.

This then gives us the option to if we want, provide modules for gem management: puppet-bundler, etc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 agreed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and removed in 1794fa1

dgoodlad added a commit that referenced this pull request Apr 24, 2014
Rewrite with support for both rbenv and chruby
@dgoodlad dgoodlad merged commit c06526a into master Apr 24, 2014
@dgoodlad dgoodlad deleted the rbenv-and-chruby-sittin-in-a-tree branch April 24, 2014 08:38
@haileys
Copy link
Contributor

haileys commented Apr 24, 2014

🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

6 participants