Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING: Fix webhook installation by pinning sinatra gem #366

Merged
merged 2 commits into from
May 9, 2017

Conversation

alexjfisher
Copy link
Member

@alexjfisher alexjfisher commented May 8, 2017

Sinatra 2.0.0 was released on the 7th of May 2017. It requires rack ~> 2.0 and that requires ruby 2.2. Puppet 4 AIO ships with ruby 2.1, so pin sinatra to prevent errors. I've also removed the code that managed rack installation as this was redundant.

This code doesn't do anything.
rack is a dependency of sinatra which the module is already installing.
portage:
repo: "git://github.com/gentoo/puppet-portage.git"
repo: "https://github.com/gentoo/puppet-portage.git"
Copy link
Member Author

Choose a reason for hiding this comment

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

oops. I didn't actually mean to commit changes to this file. I can remove them, but then again, they are very useful to those trying to test behind a firewall with only an http/https proxy available for Internet access.

Copy link
Member

Choose a reason for hiding this comment

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

That's a great catch, I have lost so much time to using git:// where it doesn't work, but never the other way around.

@alexjfisher alexjfisher force-pushed the pin_sinatra branch 2 times, most recently from f9aa997 to 2a4ed16 Compare May 8, 2017 12:33
portage:
repo: "git://github.com/gentoo/puppet-portage.git"
repo: "https://github.com/gentoo/puppet-portage.git"
Copy link
Member

Choose a reason for hiding this comment

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

That's a great catch, I have lost so much time to using git:// where it doesn't work, but never the other way around.

if !defined(Package['rack']) {
package { 'rack':
ensure => installed,
ensure => $sinatra_version,
Copy link
Member

Choose a reason for hiding this comment

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

As ~> 1.0 may not work for all possible providers, though it does work with the default provider, can you add some verbiage about it this param in either this file's header as comments, or in the README?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok. I can't think of any situation where it wouldn't be a gem provider and the package would still be called sinatra (and not ruby-sinatra or something), so a note in the source should be ok? I'll update it in the morning.

Copy link
Member

Choose a reason for hiding this comment

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

Right, but installed works with all providers, whereas ~> 1.0 doesn't work with many of them. This change could be a breaking change to someone using a non-standard provider, so I think it may be helpful to promote it in the README. I'll look tomorrow to see if there's an appropriate place unless you find one first.

Copy link
Member Author

Choose a reason for hiding this comment

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

README updated.

Sinatra 2.0.0 was released on the 7th of May 2017.  It requires rack ~>
2.0 and *that* requires ruby 2.2.  Puppet 4 AIO ships with ruby 2.1, so
pin sinatra to prevent errors like.

```
Error: Execution of '/opt/puppetlabs/puppet/bin/gem install --no-rdoc
--no-ri sinatra' returned 1: ERROR:  Error installing sinatra:
        rack requires Ruby version >= 2.2.2.
```

Fixes voxpupuli#140
@rnelson0 rnelson0 merged commit 351327b into voxpupuli:master May 9, 2017
@dhollinger dhollinger changed the title Fix webhook installation by pinning sinatra gem BREAKING: Fix webhook installation by pinning sinatra gem May 9, 2017
@rnelson0 rnelson0 mentioned this pull request May 10, 2017
@alexjfisher
Copy link
Member Author

Fixes #365

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants