itamae-plugin-recipe-rbenv 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f09973edeb4800e504f0764f23d80a40d90448b0
|
4
|
+
data.tar.gz: f56ca749bbe4a11f2b97c0516bc1098e899f72e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1b6774c12a8bd3ac859aa0a3ceca45c503cadf1efe42469a3ffa6101f38e7db056d6a0ca932ec6ffdfafeaec879fa301ec947d6ddd08606171392caf8809a88
|
7
|
+
data.tar.gz: 58366bf22e999ff9b13aedfacdecf47b82086a3b1ca34fbecf04e83978ea28fe7b884a7e94ee2bd57f19520e8368ec70d8215b2071cb9a15f31c8d6ce2c7cd94
|
data/README.md
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
require "itamae/plugin/recipe/rbenv"
|
@@ -0,0 +1,11 @@
|
|
1
|
+
def rbenv_root
|
2
|
+
node[:rbenv] && node[:rbenv][:rbenv_root] ? node[:rbenv][:rbenv_root] : "/usr/local/rbenv"
|
3
|
+
end
|
4
|
+
|
5
|
+
def rbenv_init
|
6
|
+
<<-EOS
|
7
|
+
export RBENV_ROOT=#{rbenv_root}
|
8
|
+
export PATH="#{rbenv_root}/bin:${PATH}"
|
9
|
+
eval "$(rbenv init --no-rehash -)"
|
10
|
+
EOS
|
11
|
+
end
|
@@ -2,18 +2,13 @@ package "libffi-devel"
|
|
2
2
|
package "openssl-devel"
|
3
3
|
package "readline-devel"
|
4
4
|
|
5
|
-
|
6
|
-
RBENV_INIT = <<-EOS
|
7
|
-
export RBENV_ROOT=#{RBENV_ROOT}
|
8
|
-
export PATH="#{RBENV_ROOT}/bin:${PATH}"
|
9
|
-
eval "$(rbenv init --no-rehash -)"
|
10
|
-
EOS
|
5
|
+
require "itamae/plugin/recipe/rbenv"
|
11
6
|
|
12
|
-
git
|
7
|
+
git rbenv_root do
|
13
8
|
repository "git://github.com/sstephenson/rbenv.git"
|
14
9
|
end
|
15
10
|
|
16
|
-
git "#{
|
11
|
+
git "#{rbenv_root}/plugins/ruby-build" do
|
17
12
|
repository "git://github.com/sstephenson/ruby-build.git"
|
18
13
|
if node[:'ruby-build'] && node[:'ruby-build'][:revision]
|
19
14
|
revision node[:'ruby-build'][:revision]
|
@@ -22,14 +17,14 @@ end
|
|
22
17
|
|
23
18
|
node[:rbenv][:versions].each do |version|
|
24
19
|
execute "rbenv install #{version}" do
|
25
|
-
command "#{
|
26
|
-
not_if "#{
|
20
|
+
command "#{rbenv_init} rbenv install #{version}"
|
21
|
+
not_if "#{rbenv_init} rbenv versions | grep #{version}"
|
27
22
|
end
|
28
23
|
end
|
29
24
|
|
30
25
|
node[:rbenv][:global].tap do |version|
|
31
26
|
execute "rbenv global #{version}" do
|
32
|
-
command "#{
|
33
|
-
not_if "#{
|
27
|
+
command "#{rbenv_init} rbenv global #{version}"
|
28
|
+
not_if "#{rbenv_init} rbenv version | grep #{version}"
|
34
29
|
end
|
35
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itamae-plugin-recipe-rbenv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takashi Kokubun
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -51,6 +51,7 @@ files:
|
|
51
51
|
- README.md
|
52
52
|
- Rakefile
|
53
53
|
- itamae-plugin-recipe-rbenv.gemspec
|
54
|
+
- lib/itamae-plugin-recipe-rbenv.rb
|
54
55
|
- lib/itamae/plugin/recipe/rbenv.rb
|
55
56
|
- lib/itamae/plugin/recipe/rbenv/system.rb
|
56
57
|
- lib/itamae/plugin/recipe/rbenv/version.rb
|
@@ -79,3 +80,4 @@ signing_key:
|
|
79
80
|
specification_version: 4
|
80
81
|
summary: Itamae plugin to install ruby with rbenv
|
81
82
|
test_files: []
|
83
|
+
has_rdoc:
|