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

fix error when gem install bundler #108

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
10 changes: 10 additions & 0 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -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}"

6 changes: 6 additions & 0 deletions .gemfile
Original file line number Diff line number Diff line change
@@ -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'
24 changes: 24 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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:
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -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

9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,12 @@ doc/
spec/fixtures/
pkg/
.vagrant/
/.gradle
/metadata.json
/.rvmrc
build
pkg/
Session.vim
spec/fixtures
.*.sw[a-z]
*.un~
23 changes: 23 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>rvm</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.puppetlabs.geppetto.pp.dsl.ui.modulefileBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.puppetlabs.geppetto.pp.dsl.ui.puppetNature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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:
- [email protected]
37 changes: 15 additions & 22 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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: [email protected]

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.
2 changes: 1 addition & 1 deletion Modulefile
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>'
project_page 'https://github.com/blt04/puppet-rvm'
Expand Down
10 changes: 10 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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;
}

Expand Down
Empty file added README.md
Empty file.
5 changes: 5 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -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')
2 changes: 1 addition & 1 deletion lib/puppet/provider/rvm_alias/alias.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/provider/rvm_gem/gem.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/provider/rvm_gemset/gemset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/provider/rvm_system_ruby/rvm_system_ruby.rb
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
9 changes: 4 additions & 5 deletions manifests/init.pp
Original file line number Diff line number Diff line change
@@ -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;
}
}
}
2 changes: 1 addition & 1 deletion manifests/system.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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'",
Expand Down
2 changes: 1 addition & 1 deletion manifests/system_user.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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]];
}
}