File tree Expand file tree Collapse file tree 2 files changed +30
-29
lines changed
Expand file tree Collapse file tree 2 files changed +30
-29
lines changed Original file line number Diff line number Diff line change 11# frozen_string_literal: true
2+
23module VCAP ::CloudController
3- class StackConfigFile
4- def initialize ( file_path )
5- @hash = YAMLConfig . safe_load_file ( file_path ) . tap do |h |
6- Schema . validate ( h )
7- end
4+ class StackConfigFile
5+ def initialize ( file_path )
6+ @hash = YAMLConfig . safe_load_file ( file_path ) . tap do |h |
7+ Schema . validate ( h )
88 end
9+ end
910
10- def stacks
11- @hash [ 'stacks' ]
12- end
11+ def stacks
12+ @hash [ 'stacks' ]
13+ end
1314
14- def deprecated_stacks
15- @hash [ 'deprecated_stacks' ]
16- end
15+ def deprecated_stacks
16+ @hash [ 'deprecated_stacks' ]
17+ end
1718
18- def default
19- @hash [ 'default' ]
20- end
19+ def default
20+ @hash [ 'default' ]
21+ end
2122
22- Schema = Membrane ::SchemaParser . parse do
23- {
24- 'default' => String ,
25- 'stacks' => [ {
26- 'name' => String ,
27- 'description' => String ,
28- optional ( 'build_rootfs_image' ) => String ,
29- optional ( 'run_rootfs_image' ) => String
30- } ] ,
31- optional ( 'deprecated_stacks' ) => [
32- String
33- ]
34- }
35- end
23+ Schema = Membrane ::SchemaParser . parse do
24+ {
25+ 'default' => String ,
26+ 'stacks' => [ {
27+ 'name' => String ,
28+ 'description' => String ,
29+ optional ( 'build_rootfs_image' ) => String ,
30+ optional ( 'run_rootfs_image' ) => String
31+ } ] ,
32+ optional ( 'deprecated_stacks' ) => [
33+ String
34+ ]
35+ }
3636 end
3737 end
38+ end
Original file line number Diff line number Diff line change @@ -11,4 +11,4 @@ namespace :stacks do
1111 require 'cloud_controller/check_stacks'
1212 VCAP ::CloudController ::CheckStacks . new ( RakeConfig . config , db ) . validate_stacks
1313 end
14- end
14+ end
You can’t perform that action at this time.
0 commit comments