vmc 0.4.0.beta.39 → 0.4.0.beta.40

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.
@@ -179,7 +179,7 @@ module VMC
179
179
  end
180
180
  end
181
181
 
182
- runtimes = v2? ? client.runtimes : framework.runtimes
182
+ runtimes = framework.runtimes || client.runtimes
183
183
  runtime = input[:runtime, runtimes]
184
184
 
185
185
  fail "Invalid framework '#{input[:framework]}'" unless framework
@@ -5,27 +5,31 @@ module VMC
5
5
  @path = path
6
6
  end
7
7
 
8
- def all_frameworks
9
- @client.frameworks
8
+ def framework_info
9
+ @framework_info ||= @client.info[:frameworks]
10
10
  end
11
11
 
12
- def find_top(entries)
13
- found = false
12
+ def all_runtimes
13
+ @all_runtiems ||= @client.runtimes
14
+ end
14
15
 
15
- entries.each do |e|
16
- is_toplevel =
17
- e.ftype == :directory && e.name.index("/") + 1 == e.name.size
16
+ def all_frameworks
17
+ @all_frameworks ||= @client.frameworks
18
18
 
19
- if is_toplevel && e.name !~ /^(\.|__MACOSX)/
20
- if found
21
- return false
22
- else
23
- found = e.name
24
- end
19
+ @all_frameworks.each do |f|
20
+ next if f.detection && f.runtimes
21
+
22
+ if info = framework_info[f.name.to_sym]
23
+ f.detection = info[:detection]
24
+
25
+ runtime_names = info[:runtimes].collect { |r| r[:name] }
26
+ f.runtimes = all_runtimes.select { |r|
27
+ runtime_names.include?(r.name)
28
+ }
25
29
  end
26
30
  end
27
31
 
28
- found
32
+ @all_frameworks
29
33
  end
30
34
 
31
35
  def frameworks
@@ -82,5 +86,26 @@ module VMC
82
86
 
83
87
  [matches, default]
84
88
  end
89
+
90
+ private
91
+
92
+ def find_top(entries)
93
+ found = false
94
+
95
+ entries.each do |e|
96
+ is_toplevel =
97
+ e.ftype == :directory && e.name.index("/") + 1 == e.name.size
98
+
99
+ if is_toplevel && e.name !~ /^(\.|__MACOSX)/
100
+ if found
101
+ return false
102
+ else
103
+ found = e.name
104
+ end
105
+ end
106
+ end
107
+
108
+ found
109
+ end
85
110
  end
86
111
  end
@@ -1,3 +1,3 @@
1
1
  module VMC
2
- VERSION = "0.4.0.beta.39"
2
+ VERSION = "0.4.0.beta.40"
3
3
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vmc
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1686938957
4
+ hash: -2328282212
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
9
  - 0
10
10
  - beta
11
- - 39
12
- version: 0.4.0.beta.39
11
+ - 40
12
+ version: 0.4.0.beta.40
13
13
  platform: ruby
14
14
  authors:
15
15
  - VMware
@@ -249,12 +249,12 @@ dependencies:
249
249
  requirements:
250
250
  - - ~>
251
251
  - !ruby/object:Gem::Version
252
- hash: 33
252
+ hash: 39
253
253
  segments:
254
254
  - 0
255
255
  - 3
256
- - 25
257
- version: 0.3.25
256
+ - 26
257
+ version: 0.3.26
258
258
  type: :runtime
259
259
  version_requirements: *id014
260
260
  - !ruby/object:Gem::Dependency
@@ -281,12 +281,12 @@ dependencies:
281
281
  requirements:
282
282
  - - ~>
283
283
  - !ruby/object:Gem::Version
284
- hash: 9
284
+ hash: 7
285
285
  segments:
286
286
  - 0
287
287
  - 4
288
- - 3
289
- version: 0.4.3
288
+ - 4
289
+ version: 0.4.4
290
290
  type: :runtime
291
291
  version_requirements: *id016
292
292
  - !ruby/object:Gem::Dependency