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

Commit

Permalink
Merge pull request #155 from n0ts/fix-indent
Browse files Browse the repository at this point in the history
Fix a indent, Update latest version
  • Loading branch information
jacobbednarz authored Dec 29, 2016
2 parents 9253aa5 + cfa729e commit 4c7b6e1
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 17 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ You can find a release list of versions for ruby-build [here](https://github.com
```puppet
# Set the global default ruby (auto-installs it if it can)
class { 'ruby::global':
version => '2.3.1'
version => '2.4.0'
}
# ensure a certain ruby version is used in a dir
ruby::local { '/path/to/some/project':
version => '2.3.1'
version => '2.4.0'
}
# ensure a gem is installed for a certain ruby version
# note, you can't have duplicate resource names so you have to name like so
$version = "2.3.1"
$version = "2.4.0"
ruby_gem { "bundler for ${version}":
gem => 'bundler',
version => '~> 1.2.0',
Expand All @@ -62,7 +62,7 @@ ruby_gem { 'bundler for all rubies':
}
# install a ruby version
ruby::version { '2.3.1': }
ruby::version { '2.4.0': }
# Installing rbenv plugin
ruby::rbenv::plugin { 'rbenv-vars':
Expand All @@ -71,9 +71,9 @@ ruby::rbenv::plugin { 'rbenv-vars':
}
# Run an installed gem
exec { '/opt/rubies/2.3.1/bin/bundle install':
exec { '/opt/rubies/2.4.0/bin/bundle install':
cwd => "~/src/project",
require => Ruby_Gem['bundler for 2.3.1']
require => Ruby_Gem['bundler for 2.4.0']
}
```

Expand All @@ -87,9 +87,9 @@ The following variables may be automatically overridden with Hiera:
"ruby::provider": "chruby"
"ruby::user": "deploy"

"ruby::build::ensure": "v20160913"
"ruby::build::ensure": "v20161225"
"ruby::chruby::ensure": "v0.3.9"
"ruby::rbenv::ensure": "v1.0.0"
"ruby::rbenv::ensure": "v1.1.0"

# rbenv plugins
"ruby::rbenv::plugins":
Expand Down
2 changes: 1 addition & 1 deletion data/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ruby::prefix: '/opt'
ruby::provider: 'rbenv'
ruby::user: "%{::id}"

ruby::build::ensure: 'v20161121'
ruby::build::ensure: 'v20161225'
ruby::build::prefix: "%{hiera('ruby::prefix')}/ruby-build"
ruby::build::user: "%{hiera('ruby::user')}"

Expand Down
2 changes: 1 addition & 1 deletion manifests/alias.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Usage:
#
# ruby::alias { '1.9.3': to => '2.0.0-p594' }
# ruby::alias { '1.9.3': to => '2.0.0-p648' }

define ruby::alias(
$ensure = 'installed',
Expand Down
2 changes: 0 additions & 2 deletions manifests/chruby.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
$user = $ruby::chruby::user,
$auto_switch = $ruby::chruby::auto_switch,
) {

require ruby

repository { $prefix:
Expand All @@ -22,5 +21,4 @@
source => 'postmodern/chruby',
user => $user
}

}
4 changes: 2 additions & 2 deletions manifests/global.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#
# Usage:
#
# class { 'ruby::global': version => '1.9.3' }
# class { 'ruby::global': version => '2.0.0-p648' }

class ruby::global($version = '1.9.3') {
class ruby::global($version = '2.0.0-p648') {
require ruby

if $ruby::provider == 'rbenv' {
Expand Down
3 changes: 0 additions & 3 deletions manifests/version.pp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
to => $to,
}
} else {

case $version {
/jruby/: { require 'java' }
default: { }
Expand Down Expand Up @@ -67,7 +66,5 @@
user => $ruby::user,
provider => rubybuild,
}

}

}

0 comments on commit 4c7b6e1

Please sign in to comment.