itamae-plugin-recipe-anyenv 0.3.25 → 0.3.26

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: 4ad7776889a3ea70a41d029eba714f47c87c83f9
4
- data.tar.gz: 05c95921e54bdff4b3feee7472471cf85eca5525
3
+ metadata.gz: 9ce4ed3a781c694d8dbe46d0a01be2fc3abd6082
4
+ data.tar.gz: 4f487490e92c6087ad273a24479af0e91349fae1
5
5
  SHA512:
6
- metadata.gz: 76d32b8a31d52a4f005fbb156298aac750315ee357254cb7f6301a908b04351ae441ffe7888d723a44b358da7c42e76895b41fb0707149bbf553de6c7422f311
7
- data.tar.gz: 2466a9c2763b560e5a41bc15121613de64206b77ae7c0bfcd9a193c404681fe3f1293767d9b0dc55804e5c9249d4f4d0a42fd001c0e6c989ea72b04cc861dc07
6
+ metadata.gz: c3f908fb2c23e7f7ff7c0cf5d829b1d7d0059f559baa846a3173d3315629a5714dcfe5697a069bea778444c8879d48b73a779e5412cf8289bbe9bf99fc3d8569
7
+ data.tar.gz: 62936362a9abcc20a36078396d9b67a98abaccc6be9e0798a08bb0e221ce449628ee66ededbdd60f95234fb892de182b45b70eafd5f53c39215067ac76d7cf7b
@@ -2,7 +2,7 @@ module Itamae
2
2
  module Plugin
3
3
  module Recipe
4
4
  module Anyenv
5
- VERSION = '0.3.25'.freeze
5
+ VERSION = '0.3.26'.freeze
6
6
  end
7
7
  end
8
8
  end
@@ -1,24 +1,22 @@
1
1
  DEFAULT_ANYENV_ROOT = '/usr/local/anyenv'.freeze
2
2
 
3
3
  def run(attributes, username = ENV['USER'])
4
- # init(username)
4
+ init(username)
5
5
 
6
6
  p :USR
7
7
  p ENV['USER']
8
8
  p :ANYENV_ROOT
9
9
  p ENV['ANYENV_ROOT']
10
10
 
11
- root_path = ENV['ANYENV_ROOT'] || DEFAULT_ANYENV_ROOT
11
+ clone_anyenv(@root_path)
12
+ clone_anyenv_update(@root_path)
12
13
 
13
- clone_anyenv(root_path)
14
- clone_anyenv_update(root_path)
14
+ directory "#{@root_path}/envs"
15
15
 
16
- directory "#{root_path}/envs"
17
-
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)
16
+ install('anyenv', 'rbenv')
17
+ install('rbenv', '2.3.1')
18
+ install('anyenv', 'exenv')
19
+ install('exenv', '1.3.2')
22
20
 
23
21
 
24
22
 
@@ -31,19 +29,20 @@ def scheme
31
29
  @scheme ||= node[:anyenv][:scheme] || 'git'
32
30
  end
33
31
 
34
- def install(from, to, root_path)
32
+ def install(from, to)
35
33
  execute <<-"EOS".gsub("\n", ' ')
36
- export ANYENV_ROOT=#{root_path};
34
+ export ANYENV_ROOT=#{@root_path};
37
35
  export PATH=#{root_path}/bin:${PATH};
38
36
  eval "$(anyenv init -)";
39
37
  yes | #{from} install #{to};
40
38
  EOS
41
39
  end
42
- # def init(username)
43
- # @username = username
44
- # @anyenv_root_path = anyenv_root(username)
45
- # @init_cmd = anyenv_init(@anyenv_root_path)
46
- # end
40
+
41
+ def init(username)
42
+ @username = username
43
+ @root_path = ENV['ANYENV_ROOT'] || DEFAULT_ANYENV_ROOT
44
+ # @init_cmd = anyenv_init(@anyenv_root_path)
45
+ end
47
46
 
48
47
 
49
48
  # def anyenv_root(username)
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.25
4
+ version: 0.3.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Surume