method
check
v7.1.3.2 -
Show latest stable
-
0 notes -
Class: GeneralConfiguration
- 1.0.0
- 1.1.6
- 1.2.6
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.8
- 3.0.0
- 3.0.9
- 3.1.0
- 3.2.1
- 3.2.8
- 3.2.13
- 4.0.2
- 4.1.8
- 4.2.1
- 4.2.7
- 4.2.9
- 5.0.0.1
- 5.1.7
- 5.2.3
- 6.0.0
- 6.1.3.1
- 6.1.7.7
- 7.0.0
- 7.1.3.2 (0)
- 7.1.3.4 (0)
- What's this?
check()
public
Hide source
# File tools/rail_inspector/lib/rail_inspector/configuring/check/general_configuration.rb, line 35 def check header, *config_sections = documented_general_config non_nested_accessors = expected_accessors.reject do |a| config_sections.any? { |section| /\.#{a}\./.match?(section[0]) } end non_nested_accessors.each do |accessor| config_header = "#### `config.#{accessor}`" unless config_sections.any? { |section| section[0] == config_header } checker.errors << "Missing configuration: #{config_header}" config_sections << [config_header, "", "FIXME", ""] end end new_config = header + config_sections.sort_by { |section| section[0].split("`")[1] }.flatten return if new_config == checker.doc.general_config checker.errors << "General Configuration is not alphabetical" checker.doc.general_config = new_config end