itamae-plugin-recipe-anyenv 0.3.24 → 0.3.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf993f337018bf66b6704b968594cf1355baddcc
4
- data.tar.gz: d419fa2dfa93c321e4aca0a9c931326b58f7dc81
3
+ metadata.gz: 4ad7776889a3ea70a41d029eba714f47c87c83f9
4
+ data.tar.gz: 05c95921e54bdff4b3feee7472471cf85eca5525
5
5
  SHA512:
6
- metadata.gz: 2895fec748c45c7ed9eb9366792b0798ca6a5de6898b45eb4d49244cf3f40302d9d66bbdbddef5ba76ca52ff7292c4f389393adb5aef09cdbf22f5813b72968f
7
- data.tar.gz: cc86190fded6d23c3493d78f6f009c70f8bfe5db7c1d22ca6481151c1eb389d4c090a41638a0fa21c274ed06fa721acdc8ebf6f083e6d3836c720e6a93db8dc6
6
+ metadata.gz: 76d32b8a31d52a4f005fbb156298aac750315ee357254cb7f6301a908b04351ae441ffe7888d723a44b358da7c42e76895b41fb0707149bbf553de6c7422f311
7
+ data.tar.gz: 2466a9c2763b560e5a41bc15121613de64206b77ae7c0bfcd9a193c404681fe3f1293767d9b0dc55804e5c9249d4f4d0a42fd001c0e6c989ea72b04cc861dc07
@@ -15,33 +15,10 @@ def run(attributes, username = ENV['USER'])
15
15
 
16
16
  directory "#{root_path}/envs"
17
17
 
18
- execute <<-"EOS".gsub("\n", ' ')
19
- export ANYENV_ROOT=#{root_path};
20
- export PATH=#{root_path}/bin:${PATH};
21
- eval "$(anyenv init -)";
22
- yes | anyenv install rbenv;
23
- EOS
24
-
25
- execute <<-"EOS".gsub("\n", ' ')
26
- export ANYENV_ROOT=#{root_path};
27
- export PATH=#{root_path}/bin:${PATH};
28
- eval "$(anyenv init -)";
29
- yes | rbenv install 2.3.1;
30
- EOS
31
-
32
- execute <<-"EOS".gsub("\n", ' ')
33
- export ANYENV_ROOT=#{root_path};
34
- export PATH=#{root_path}/bin:${PATH};
35
- eval "$(anyenv init -)";
36
- yes | anyenv install exenv;
37
- EOS
38
-
39
- execute <<-"EOS".gsub("\n", ' ')
40
- export ANYENV_ROOT=#{root_path};
41
- export PATH=#{root_path}/bin:${PATH};
42
- eval "$(anyenv init -)";
43
- yes | exenv install 1.0.0;
44
- EOS
18
+ install('anyenv', 'rbenv', root_path)
19
+ install('rbenv', '2.3.1', root_path)
20
+ install('anyenv', 'exenv', root_path)
21
+ install('exenv', '1.3.2', root_path)
45
22
 
46
23
 
47
24
 
@@ -54,6 +31,14 @@ def scheme
54
31
  @scheme ||= node[:anyenv][:scheme] || 'git'
55
32
  end
56
33
 
34
+ def install(from, to, root_path)
35
+ execute <<-"EOS".gsub("\n", ' ')
36
+ export ANYENV_ROOT=#{root_path};
37
+ export PATH=#{root_path}/bin:${PATH};
38
+ eval "$(anyenv init -)";
39
+ yes | #{from} install #{to};
40
+ EOS
41
+ end
57
42
  # def init(username)
58
43
  # @username = username
59
44
  # @anyenv_root_path = anyenv_root(username)
@@ -2,7 +2,7 @@ module Itamae
2
2
  module Plugin
3
3
  module Recipe
4
4
  module Anyenv
5
- VERSION = '0.3.24'.freeze
5
+ VERSION = '0.3.25'.freeze
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itamae-plugin-recipe-anyenv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.24
4
+ version: 0.3.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Surume