Skip to content

Commit

Permalink
Pin sinatra gem
Browse files Browse the repository at this point in the history
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
  • Loading branch information
alexjfisher committed May 8, 2017
1 parent eef5801 commit 0c06378
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
$webhook_configfile_mode = '0644'
$webhook_ignore_environments = []
$webhook_mco_arguments = undef
$webhook_sinatra_version = '~> 1.0' # Sinatra 2 requires rack 2 which in turn requires ruby 2.2. Puppet 4 AIO ships with ruby 2.1

# Service Settings for SystemD in EL7
if $::osfamily == 'RedHat' and $::operatingsystemmajrelease == '7' {
Expand Down
7 changes: 4 additions & 3 deletions manifests/webhook/package.pp
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Private class, do not include it directly.
# Installs the webhook packages
class r10k::webhook::package (
$is_pe_server = $r10k::params::is_pe_server,
$provider = $r10k::params::provider,
$is_pe_server = $r10k::params::is_pe_server,
$provider = $r10k::params::provider,
$sinatra_version = $r10k::params::webhook_sinatra_version,
) inherits r10k::params {
if !defined(Package['sinatra']) {
package { 'sinatra':
ensure => installed,
ensure => $sinatra_version,
provider => $provider,
before => Service['webhook'],
}
Expand Down

0 comments on commit 0c06378

Please sign in to comment.