diff --git a/.fixtures.yml b/.fixtures.yml
new file mode 100644
index 00000000..4091eca5
--- /dev/null
+++ b/.fixtures.yml
@@ -0,0 +1,10 @@
+fixtures:
+ repositories:
+ "puppi": "git://github.com/example42/puppi.git"
+ "monitor": "git://github.com/example42/puppet-monitor.git"
+ "firewall": "git://github.com/example42/puppet-firewall.git"
+ "iptables": "git://github.com/example42/puppet-iptables.git"
+ "concat": "git://github.com/example42/puppet-concat.git"
+ symlinks:
+ "rvm": "#{source_dir}"
+
diff --git a/.gemfile b/.gemfile
new file mode 100644
index 00000000..459723a8
--- /dev/null
+++ b/.gemfile
@@ -0,0 +1,6 @@
+source :rubygems
+
+puppetversion = ENV['PUPPET_VERSION']
+gem 'puppet', puppetversion, :require => false
+gem 'puppet-lint'
+gem 'puppetlabs_spec_helper', '>= 0.1.0'
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
new file mode 100644
index 00000000..293aab1b
--- /dev/null
+++ b/.github/CONTRIBUTING.md
@@ -0,0 +1,24 @@
+## How to Contribute to This Project
+
+Note: This repository is not currently actively maintained.
+
+#### **Did You Find a Bug?**
+
+ * **Ensure the bug was not already reported** by searching on GitHub under **Issues**.
+ * If you have a solution that doens't introduce backward incompatibilities, feel free to open it and submit a **Pull Request** for it.
+ * If you need a fix from us, check the **Sponsor** chapter.
+
+#### ** Do you want to maintain this repo?**
+
+Since example42 is not maintaining any more this project, we accept candidates for maintaining it. If you want to become a maintainer, contact us.
+
+#### **Do You Want to Sponsor Open Source Development?**
+
+If you need to fix a bug on this project or new want eatures you can consider the opportunity of **sponsoring** the relevant development.
+
+ * Open an issue on GitHub (of type `bug` or `enhancement`) with the details of what you want
+ * Contact [example42](http://www.example42.com/#contact) referring the issue you created
+ * Tell us how you want to sponsor the development (sending money, gifts or offering services)
+ * If we agree on the conditions we will place your [company] name in the module's Sponsors List
+
+Thanks for contributing! :heart:
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
new file mode 100644
index 00000000..1d8c11a6
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,19 @@
+## Expected Behavior
+
+
+## Actual Behavior
+
+
+## Steps to Reproduce the Problem
+
+ 1.
+ 1.
+ 1.
+
+## Specifications
+
+Please add this info:
+
+ 1. Output of ```facter -p``` on the failing node (at least the OS related facts)
+ 1. Version of Puppet and of the module
+ 1. The relevant Puppet code and eventually Hiera data
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 00000000..8b0f8099
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,12 @@
+## Before submitting your PR
+
+ 1. Open an **issue** and refer to its number in your PR title
+ 1. If it's a bug and you have the solution, go on with the PR!
+ 1. If it's an enhancement, please wait for our feedback before starting to work on it
+ 1. Please run ```puppet-lint``` on your code and ensure it's compliant
+
+## After submitting your PR
+
+ 1. Verify Travis checks and eventually fix the errors
+ 1. Feel free to ping us if we don't reply promptly
+
diff --git a/.gitignore b/.gitignore
index 78485034..e9ce5a4f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,12 @@ doc/
spec/fixtures/
pkg/
.vagrant/
+/.gradle
+/metadata.json
+/.rvmrc
+build
+pkg/
+Session.vim
+spec/fixtures
+.*.sw[a-z]
+*.un~
diff --git a/.project b/.project
new file mode 100644
index 00000000..ad65efb4
--- /dev/null
+++ b/.project
@@ -0,0 +1,23 @@
+
+
+ rvm
+
+
+
+
+
+ com.puppetlabs.geppetto.pp.dsl.ui.modulefileBuilder
+
+
+
+
+ org.eclipse.xtext.ui.shared.xtextBuilder
+
+
+
+
+
+ com.puppetlabs.geppetto.pp.dsl.ui.puppetNature
+ org.eclipse.xtext.ui.shared.xtextNature
+
+
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000..dffeca98
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,21 @@
+language: ruby
+rvm:
+ - 1.8.7
+ - 1.9.3
+script:
+ - "rake spec SPEC_OPTS='--format documentation'"
+env:
+ - PUPPET_VERSION="~> 2.6.0"
+ - PUPPET_VERSION="~> 2.7.0"
+ - PUPPET_VERSION="~> 3.0.0"
+ - PUPPET_VERSION="~> 3.1.0"
+matrix:
+ exclude:
+ - rvm: 1.9.3
+ env: PUPPET_VERSION="~> 2.6.0"
+ gemfile: .gemfile
+
+gemfile: .gemfile
+notifications:
+ email:
+ - al@lab42.it
diff --git a/LICENSE b/LICENSE
index 0f434f8b..f41da018 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,24 +1,17 @@
-Copyright (c) 2012, Brandon Turner
-All rights reserved.
+Copyright (C) 2013 Alessandro Franceschi / Lab42
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * Neither the name of Brandon Turner nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
+for the relevant commits Copyright (C) by the respective authors.
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL BRANDON TURNER BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+Contact Lab42 at: info@lab42.it
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/Modulefile b/Modulefile
index 71ee780b..eea43296 100644
--- a/Modulefile
+++ b/Modulefile
@@ -1,5 +1,5 @@
name 'puppet-rvm'
-version '1.0.0'
+version '1.0.1'
summary 'A puppet module for installing and using RVM (Ruby Version Manager)'
author 'Brandon Turner '
project_page 'https://github.com/blt04/puppet-rvm'
diff --git a/README.markdown b/README.markdown
index 9090325a..6870fa38 100644
--- a/README.markdown
+++ b/README.markdown
@@ -1,6 +1,14 @@
Puppet Module for Ruby Version Manager (RVM)
==============================================
+## DEPRECATION NOTICE
+This module is no more actively maintained and will hardly be updated.
+
+Please find an alternative module from other authors or consider [Tiny Puppet](https://github.com/example42/puppet-tp) as replacement.
+
+If you want to maintain this module, contact [Alessandro Franceschi](https://github.com/alvagante)
+
+
This module handles installing system RVM (also known as multi-user installation
as root) and using it to install rubies and gems. Support for installing and
configuring passenger is also included.
@@ -62,9 +70,11 @@ You can tell RVM to install one or more Ruby versions with:
rvm_system_ruby {
'ruby-1.9.2-p290':
ensure => 'present',
+ require => Class['rvm::system'],
default_use => true;
'ruby-1.8.7-p357':
ensure => 'present',
+ require => Class['rvm::system'],
default_use => false;
}
diff --git a/README.md b/README.md
new file mode 100644
index 00000000..e69de29b
diff --git a/Rakefile b/Rakefile
new file mode 100644
index 00000000..1a8a8a0c
--- /dev/null
+++ b/Rakefile
@@ -0,0 +1,5 @@
+require 'rubygems'
+require 'puppetlabs_spec_helper/rake_tasks'
+require 'puppet-lint'
+PuppetLint.configuration.send("disable_80chars")
+PuppetLint.configuration.send('disable_class_parameter_defaults')
diff --git a/lib/puppet/provider/rvm_alias/alias.rb b/lib/puppet/provider/rvm_alias/alias.rb
index ff62fdf9..75a51276 100644
--- a/lib/puppet/provider/rvm_alias/alias.rb
+++ b/lib/puppet/provider/rvm_alias/alias.rb
@@ -2,7 +2,7 @@
Puppet::Type.type(:rvm_alias).provide(:alias) do
desc "RVM alias support."
- commands :rvmcmd => "/usr/local/rvm/bin/rvm"
+ optional_commands :rvmcmd => "/usr/local/rvm/bin/rvm"
def target_ruby
resource[:target_ruby]
diff --git a/lib/puppet/provider/rvm_gem/gem.rb b/lib/puppet/provider/rvm_gem/gem.rb
index 0b44be55..a3b3b6f3 100644
--- a/lib/puppet/provider/rvm_gem/gem.rb
+++ b/lib/puppet/provider/rvm_gem/gem.rb
@@ -6,7 +6,7 @@
desc "Ruby Gem support using RVM."
has_feature :versionable
- commands :rvmcmd => "/usr/local/rvm/bin/rvm"
+ optional_commands :rvmcmd => "/usr/local/rvm/bin/rvm"
def ruby_version
diff --git a/lib/puppet/provider/rvm_gemset/gemset.rb b/lib/puppet/provider/rvm_gemset/gemset.rb
index 63725e8c..e33cb554 100644
--- a/lib/puppet/provider/rvm_gemset/gemset.rb
+++ b/lib/puppet/provider/rvm_gemset/gemset.rb
@@ -2,7 +2,7 @@
Puppet::Type.type(:rvm_gemset).provide(:gemset) do
desc "RVM gemset support."
- commands :rvmcmd => "/usr/local/rvm/bin/rvm"
+ optional_commands :rvmcmd => "/usr/local/rvm/bin/rvm"
def ruby_version
resource[:ruby_version]
diff --git a/lib/puppet/provider/rvm_system_ruby/rvm_system_ruby.rb b/lib/puppet/provider/rvm_system_ruby/rvm_system_ruby.rb
index 2f28dc21..97fb0f9b 100644
--- a/lib/puppet/provider/rvm_system_ruby/rvm_system_ruby.rb
+++ b/lib/puppet/provider/rvm_system_ruby/rvm_system_ruby.rb
@@ -1,7 +1,7 @@
Puppet::Type.type(:rvm_system_ruby).provide(:rvm) do
desc "Ruby RVM support."
- commands :rvmcmd => "/usr/local/rvm/bin/rvm"
+ optional_commands :rvmcmd => "/usr/local/rvm/bin/rvm"
def create
set_autolib_mode if resource.value(:autolib_mode)
diff --git a/manifests/init.pp b/manifests/init.pp
index 75d2fba4..c2c78bc5 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -1,10 +1,9 @@
-class rvm($version=undef, $install_rvm=true) {
- stage { 'rvm-install': before => Stage['main'] }
-
+class rvm($version='latest', $install_rvm=true) {
+# stage { 'rvm-install': before => Stage['main'] }
if $install_rvm {
class {
- 'rvm::dependencies': stage => 'rvm-install';
- 'rvm::system': stage => 'rvm-install', version => $version;
+ 'rvm::dependencies': before => Class['rvm::system'];
+ 'rvm::system': version => $version;
}
}
}
diff --git a/manifests/system.pp b/manifests/system.pp
index ef2cd02a..448c0edc 100644
--- a/manifests/system.pp
+++ b/manifests/system.pp
@@ -8,7 +8,7 @@
exec { 'system-rvm':
path => '/usr/bin:/usr/sbin:/bin',
- command => "bash -c '/usr/bin/curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer -o /tmp/rvm-installer && \
+ command => "bash -c '/usr/bin/curl -s -L https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer -o /tmp/rvm-installer && \
chmod +x /tmp/rvm-installer && \
rvm_bin_path=/usr/local/rvm/bin rvm_man_path=/usr/local/rvm/man /tmp/rvm-installer --version ${actual_version} && \
rm /tmp/rvm-installer'",
diff --git a/manifests/system_user.pp b/manifests/system_user.pp
index 341694f4..be3c7852 100644
--- a/manifests/system_user.pp
+++ b/manifests/system_user.pp
@@ -19,6 +19,6 @@
exec { "/usr/sbin/usermod -a -G $group $username":
unless => "/bin/cat /etc/group | grep $group | grep $username",
- require => [User[$username], Group[$group]];
+# require => [User[$username], Group[$group]];
}
}