File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed
Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22module VCAP ::CloudController
3- class ConfigFile
3+ class StackConfigFile
44 def initialize ( file_path )
55 @hash = YAMLConfig . safe_load_file ( file_path ) . tap do |h |
66 Schema . validate ( h )
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ def run_rootfs_image
6666 end
6767
6868 def self . configure ( file_path )
69- @config_file = ( ConfigFile . new ( file_path ) if file_path )
69+ @config_file = ( StackConfigFile . new ( file_path ) if file_path )
7070 end
7171
7272 def self . populate
@@ -99,4 +99,4 @@ def self.populate_from_hash(hash)
9999 end
100100 end
101101 end
102- end
102+ end
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ class CheckStacks
44
55 def initialize ( config , db )
66 @config = config
7- @stack_config = VCAP ::CloudController ::ConfigFile . new ( config . get ( :stacks_file ) )
7+ @stack_config = VCAP ::CloudController ::StackConfigFile . new ( config . get ( :stacks_file ) )
88 @db = db
99 end
1010
@@ -20,7 +20,6 @@ def validate_stacks
2020 def validate_stack ( deprecated_stack )
2121 configured_stacks = @stack_config . stacks
2222 deprecated_stack_in_config = ( configured_stacks . find { |stack | stack [ 'name' ] == deprecated_stack } ) . present?
23-
2423 return if deprecated_stack_in_config
2524
2625 deprecated_stack_in_db = false
@@ -30,4 +29,4 @@ def validate_stack(deprecated_stack)
3029 raise "rake task 'stack_check' failed, stack '#{ deprecated_stack } ' not supported" if deprecated_stack_in_db
3130 end
3231 end
33- end
32+ end
You can’t perform that action at this time.
0 commit comments