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 #68 from grosser/grosser/jruby
Browse files Browse the repository at this point in the history
Add jruby 1.7.6
  • Loading branch information
dgoodlad committed Dec 19, 2013
2 parents 9456fc1 + 2eb44ef commit cd13fbc
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 0 deletions.
15 changes: 15 additions & 0 deletions manifests/jruby.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Installs jruby 1.7.6 from rbenv and symlinks it as jruby.
#
# Usage:
#
# include ruby::jruby
class ruby::jruby {
require ruby
require ruby::jruby_1_7_6

file { "${ruby::rbenv_root}/versions/jruby":
ensure => symlink,
force => true,
target => "${ruby::rbenv_root}/versions/jruby-1.7.6"
}
}
10 changes: 10 additions & 0 deletions manifests/jruby_1_7_6.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Installs jruby 1.7.6 from rbenv.
#
# Usage:
#
# include ruby::jruby_1_7_6
class ruby::jruby_1_7_6 {
require java

ruby::version { 'jruby-1.7.6': }
}
13 changes: 13 additions & 0 deletions spec/classes/ruby_jruby_1_7_6_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
require 'spec_helper'

describe 'ruby::jruby_1_7_6' do
let(:facts) do
{
:boxen_home => '/opt/boxen',
}
end

it do
should contain_ruby__version('jruby-1.7.6')
end
end
15 changes: 15 additions & 0 deletions spec/classes/ruby_jruby_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'spec_helper'

describe 'ruby::jruby' do
let(:facts) { default_test_facts }

it do
should include_class('ruby::jruby_1_7_6')

should contain_file('/test/boxen/rbenv/versions/jruby').with({
:ensure => 'symlink',
:force => true,
:target => '/test/boxen/rbenv/versions/jruby-1.7.6'
})
end
end
1 change: 1 addition & 0 deletions spec/fixtures/Puppetfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ mod "stdlib", "4.0.0", :github_tarball => "puppetlabs/puppetlabs-stdlib"
mod "xquartz", "1.1.0", :github_tarball => "boxen/puppet-xquartz"
mod "autoconf", "1.0.0", :github_tarball => "boxen/puppet-autoconf"
mod "openssl", "1.0.0", :github_tarball => "boxen/puppet-openssl"
mod "java", "1.2.0", :github_tarball => "boxen/puppet-java"
6 changes: 6 additions & 0 deletions spec/fixtures/Puppetfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ GITHUBTARBALL
specs:
homebrew (1.1.2)

GITHUBTARBALL
remote: boxen/puppet-java
specs:
java (1.2.0)

GITHUBTARBALL
remote: boxen/puppet-openssl
specs:
Expand All @@ -43,6 +48,7 @@ DEPENDENCIES
boxen (= 3.1.0)
gcc (= 1.0.0)
homebrew (= 1.1.2)
java (= 1.2.0)
openssl (= 1.0.0)
repository (= 2.2.0)
stdlib (= 4.0.0)
Expand Down

0 comments on commit cd13fbc

Please sign in to comment.