itamae-plugin-recipe-anyenv 0.3.41 → 0.3.42

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: 512d5582cd6eee90a9b42a45b0c6fd1ccf5003ed
4
- data.tar.gz: 5122d860f73b50a98519cd2feb2bfd08ff9613a3
3
+ metadata.gz: d32d67c44d0ed85ba6123d731c9e22da38295410
4
+ data.tar.gz: f9021c3d0e5d39688fdc7275c51242900b8be01f
5
5
  SHA512:
6
- metadata.gz: f7af4d781af02c03b0c5e8d2744da2c3af91cca7470947d37e4e6747ee29a21838e7fb2ad7024e53fe0345d247f40bb2ee7bb03562dc65380232871bcaac2a14
7
- data.tar.gz: a84cb87a6532a5b5b71367c2cfd4217124e4b3c216716532e6694454dc29fb664ee694fdaa255fdb1529b2d743bf55e09350170538b2557aa98c78f1d45fc596
6
+ metadata.gz: 9ee0c604deb1bf5d1281fe7c250c1a72a78df0f6c153078ac9269fc52a292eed1616cf5a25e20c526c12137e5b84997dedf273b6d37388527235a9607c1de7a9
7
+ data.tar.gz: 08ba14bc4a850a8bf219f538424d22a387fb9b6e014740959adeea35192f1f27c64802108cc35e796b5802ef80917ce0ff9d09be481613f7c7efb4b08afeb431
@@ -22,22 +22,6 @@ def scheme
22
22
  @scheme ||= node[:anyenv][:scheme] || 'git'
23
23
  end
24
24
 
25
- # def install_envs(attributes)
26
- # attributes[:install_versions].each do |envs|
27
- # envs.each do |env, vers|
28
- # install('anyenv', env)
29
-
30
- # vers.each { |ver| install(env, ver) }
31
-
32
- # global_version(env, vers.first)
33
- # end
34
- # end
35
- # end
36
-
37
- # def install(from, to)
38
- # execute anyenv_init_with(@root_path, "yes | #{from} install #{to};")
39
- # end
40
-
41
25
  def init(username)
42
26
  @username = username
43
27
  @root_path = ENV['ANYENV_ROOT'] || DEFAULT_ANYENV_ROOT
@@ -52,38 +36,6 @@ def anyenv_init_with(root_path, command)
52
36
  EOS
53
37
  end
54
38
 
55
- # def anyenv_root(username)
56
- # return anyenv_system_root if username.nil?
57
- # anyenv_user_root(username)
58
- # end
59
-
60
- # def anyenv_system_root
61
- # if node[:anyenv] && node[:anyenv][:anyenv_root]
62
- # return node[:anyenv][:anyenv_root]
63
- # end
64
- # return ENV['ANYENV_ROOT'] || DEFAULT_ANYENV_ROOT
65
- # end
66
-
67
- # def anyenv_user_root(username)
68
- # if node[:anyenv][:users][username].key?(:anyenv_root)
69
- # return node[:anyenv][:users][username][:anyenv_root]
70
- # end
71
- # case node[:platform]
72
- # when 'darwin'
73
- # "/Users/#{username}/.anyenv"
74
- # else
75
- # "/home/#{username}/.anyenv"
76
- # end
77
- # end
78
-
79
- # def anyenv_init(root_path)
80
- # <<-"EOS".gsub("\n", ' ')
81
- # export ANYENV_ROOT=#{root_path};
82
- # export PATH=#{root_path}/bin:${PATH};
83
- # eval "$(anyenv init -)";
84
- # EOS
85
- # end
86
-
87
39
  def clone_repository(install_path, repo_path)
88
40
  git install_path do
89
41
  user @username if @username
@@ -148,19 +100,11 @@ def global_version(envname, version)
148
100
  #{envname} global;
149
101
  #{version}; #{envname} rehash;
150
102
  EOS
151
- is_exec = anyenv_init_with @root_path, "#{envname} global | grep #{version}"
103
+ is_exec = anyenv_init_with @root_path, "#{envname} versions | grep #{version}"
152
104
 
153
105
  execute "#{envname} global #{version}" do
154
106
  user @username if @username
155
107
  command exec
156
108
  not_if is_exec
157
109
  end
158
- # execute "#{envname} global #{version}" do
159
- # user @username if @username
160
- # command <<-EOS
161
- # #{envname} global #{version};
162
- # #{envname} rehash;
163
- # EOS
164
- # not_if "#{envname} global | grep #{version}"
165
- # end
166
110
  end
@@ -2,7 +2,7 @@ module Itamae
2
2
  module Plugin
3
3
  module Recipe
4
4
  module Anyenv
5
- VERSION = '0.3.41'.freeze
5
+ VERSION = '0.3.42'.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.41
4
+ version: 0.3.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - Surume