itamae-plugin-recipe-anyenv 0.3.34 → 0.3.35

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: 72f3136b9b0d55e96537940c93d00ca18f84eb00
4
- data.tar.gz: 5a86b04b609adc05c1e996c4bc0bcd37b8b26a5b
3
+ metadata.gz: 445c54d528ed99f45af2510810255ef020bc5172
4
+ data.tar.gz: 60e008b0c1917d3e3b23ffb87d60b7bd2639022d
5
5
  SHA512:
6
- metadata.gz: d71c4bc8f668e0dff04c55ac159aeacd47ca2efef50646866872a6e06765b5e78cb5792936c3a0762ba833b034e1f07bc5d0a6270154d5eee0b74eed3c672367
7
- data.tar.gz: 8b7335785af908cc66791b58867a939dc1fc8713d8740e166529701f71783964291fa3c10ec9ea12b2b46b0460e4a123889c22cda5b13b029b08afd345dcd033
6
+ metadata.gz: 1bc0bfa08b20f764b66921b86f7d41ef20ceb4c183886765119ed270f99d8e60a613b6becadf7b48c275cf880abc5f9d193d8608d9ea9d52af86d65657cb1b57
7
+ data.tar.gz: 545b1cc518fc17234f3e069e5089f44804579b2620afae66a2be7f3d67c7d5c35d4c34959412061290f4c13283f0a8ad028b5376ba0a6b2c6ea28e0285632b89
@@ -22,9 +22,21 @@ def scheme
22
22
  @scheme ||= node[:anyenv][:scheme] || 'git'
23
23
  end
24
24
 
25
- # def install(from, to)
26
- # execute anyenv_init_with("yes | #{from} install #{to};")
27
- # end
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("yes | #{from} install #{to};")
39
+ end
28
40
 
29
41
  def init(username)
30
42
  @username = username
@@ -91,33 +103,36 @@ def clone_anyenv_update
91
103
  clone_repository(install_path, repo_path)
92
104
  end
93
105
 
94
- def install_envs(attributes)
95
- attributes[:install_versions].each do |envs|
96
- envs.each do |env, vers|
97
- install_env(env)
106
+ # def install_envs(attributes)
107
+ # attributes[:install_versions].each do |envs|
108
+ # envs.each do |env, vers|
109
+ # install_env(env)
98
110
 
99
- vers.each { |ver| install_env_version(env, ver) }
111
+ # vers.each do |ver|
112
+ # install_env_version(env, ver)
113
+ # end
100
114
 
101
- global_version(env, vers.first)
102
- end
103
- end
104
- end
115
+ # global_version(env, vers.first)
116
+ # end
117
+ # end
118
+ # end
105
119
 
106
- def install_env(envname)
107
- execute "install #{envname}" do
108
- user @username if @username
109
- command anyenv_init_with "yes | anyenv install #{envname};"
110
- not_if anyenv_init_with "type #{envname}"
111
- end
112
- end
120
+ # def install_env(envname)
121
+ # execute "install #{envname}" do
122
+ # user @username if @username
123
+ # command @init_cmd
124
+ # command "#{@init_cmd} yes | anyenv install #{envname};"
125
+ # not_if "type #{envname}"
126
+ # end
127
+ # end
113
128
 
114
- def install_env_version(envname, version)
115
- execute "#{envname} install #{version}" do
116
- user @username if @username
117
- command anyenv_init_with "yes | #{envname} install #{version}"
118
- not_if anyenv_init_with "#{envname} versions | grep #{version}"
119
- end
120
- end
129
+ # def install_env_version(envname, version)
130
+ # execute "#{envname} install #{version}" do
131
+ # user @username if @username
132
+ # command "#{@init_cmd} yes | #{envname} install #{version}"
133
+ # not_if "#{@init_cmd} #{envname} versions | grep #{version}"
134
+ # end
135
+ # end
121
136
 
122
137
  def global_version(envname, version)
123
138
  execute "#{envname} global #{version}" do
@@ -128,4 +143,12 @@ def global_version(envname, version)
128
143
  EOS
129
144
  not_if anyenv_init_with "#{envname} global | grep #{version}"
130
145
  end
146
+ # execute "#{envname} global #{version}" do
147
+ # user @username if @username
148
+ # command <<-EOS
149
+ # #{envname} global #{version};
150
+ # #{envname} rehash;
151
+ # EOS
152
+ # not_if "#{envname} global | grep #{version}"
153
+ # end
131
154
  end
@@ -2,7 +2,7 @@ module Itamae
2
2
  module Plugin
3
3
  module Recipe
4
4
  module Anyenv
5
- VERSION = '0.3.34'.freeze
5
+ VERSION = '0.3.35'.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.34
4
+ version: 0.3.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Surume