class Bookwatch::Config::Checkers::RepositoryNamePresenceChecker
Constants
- MissingRepositoryNameError
Public Instance Methods
check(config)
click to toggle source
# File lib/bookwatch/config/checkers/repository_name_presence_checker.rb, line 7 def check(config) failures = config.sections.reject do |section| section.repo_name end if failures.empty? nil else MissingRepositoryNameError.new error_message end end
Private Instance Methods
error_message()
click to toggle source
# File lib/bookwatch/config/checkers/repository_name_presence_checker.rb, line 21 def error_message <<-ERROR Cannot locate a specific section. All sections must provide the section 'name' key under the 'repository' key: sections: - repository: name: 'your-org/your-repo' ERROR end