method

check

Importance_0
v7.1.3.4 - Show latest stable - 0 notes - Class: GeneralConfiguration
check() public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

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
Register or log in to add new notes.