itamae-plugin-recipe-anyenv 0.3.36 → 0.3.37

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: 53ae1857fb111aea890b74a61dca92918ac3c538
4
- data.tar.gz: 818e3a608eb950ef40f150012c333c9279daa4c7
3
+ metadata.gz: 2c564bbc78d44ed914633324f061c687895b780c
4
+ data.tar.gz: d34e6d70dd75d8384f67d3974b4702f3a32989e5
5
5
  SHA512:
6
- metadata.gz: dc6b3d6bda7e4b4308ef5aa9cd60695dcdfc9a9e05be86f5ed15a59825f4d0bd7e14f40cdd9d257e387b817670df3e16171bbbd2d6901f53b4b29df7cc46847b
7
- data.tar.gz: 23e640faee0ceebf6cef6498dc744cabd5afba77cf57a155fe9b1ad8f64d28d7fffcd58edd701be86ea15761d39c48e54b370e62200323ebfee9e460312b717a
6
+ metadata.gz: 511428ff985b4c1d52f30e93170b9fb5b2066e90eb5a16f41445cfd85b73af1a46a5d2b1c7c53b7a643889f893e7667a57d8c7e930ed2737dbb462c3c0a0950a
7
+ data.tar.gz: 490cd784f1f2c89843c9aaba39e08ec1d145b4e95c0aa218936ea3e8368fb075ac811e2995ecc683f8836780695f5e22bef21d2385397edbeefd1fc3121300b7
@@ -25,9 +25,9 @@ end
25
25
  def install_envs(attributes)
26
26
  attributes[:install_versions].each do |envs|
27
27
  envs.each do |env, vers|
28
- # install('anyenv', env)
28
+ install('anyenv', env)
29
29
 
30
- # vers.each { |ver| install(env, ver) }
30
+ vers.each { |ver| install(env, ver) }
31
31
 
32
32
  global_version(env, vers.first)
33
33
  end
@@ -35,7 +35,7 @@ def install_envs(attributes)
35
35
  end
36
36
 
37
37
  def install(from, to)
38
- execute anyenv_init_with("yes | #{from} install #{to};")
38
+ execute anyenv_init_with(@root_path, "yes | #{from} install #{to};")
39
39
  end
40
40
 
41
41
  def init(username)
@@ -43,10 +43,10 @@ def init(username)
43
43
  @root_path = ENV['ANYENV_ROOT'] || DEFAULT_ANYENV_ROOT
44
44
  end
45
45
 
46
- def anyenv_init_with(command)
46
+ def anyenv_init_with(root_path, command)
47
47
  <<-"EOS".gsub("\n", ' ')
48
- export ANYENV_ROOT=#{@root_path};
49
- export PATH=#{@root_path}/bin:${PATH};
48
+ export ANYENV_ROOT=#{root_path};
49
+ export PATH=#{root_path}/bin:${PATH};
50
50
  eval "$(anyenv init -)";
51
51
  #{command}
52
52
  EOS
@@ -137,7 +137,7 @@ end
137
137
  def global_version(envname, version)
138
138
  execute "#{envname} global #{version}" do
139
139
  # user @username if @username
140
- command anyenv_init_with <<-EOS
140
+ command anyenv_init_with @root_path, <<-EOS
141
141
  #{envname} global;
142
142
  #{version}; #{envname} rehash;
143
143
  EOS
@@ -2,7 +2,7 @@ module Itamae
2
2
  module Plugin
3
3
  module Recipe
4
4
  module Anyenv
5
- VERSION = '0.3.36'.freeze
5
+ VERSION = '0.3.37'.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.36
4
+ version: 0.3.37
5
5
  platform: ruby
6
6
  authors:
7
7
  - Surume