Class: Kettle::Family::ReadinessCheck
- Inherits:
-
Object
- Object
- Kettle::Family::ReadinessCheck
- Defined in:
- lib/kettle/family/readiness_check.rb
Constant Summary collapse
- REQUIRED_FILES =
%w[Gemfile Rakefile README.md CHANGELOG.md LICENSE.md].freeze
- REQUIRED_BINS =
%w[bin/rake bin/rspec].freeze
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(member:, config: nil, allowed_local_path_roots: []) ⇒ ReadinessCheck
constructor
A new instance of ReadinessCheck.
Constructor Details
#initialize(member:, config: nil, allowed_local_path_roots: []) ⇒ ReadinessCheck
Returns a new instance of ReadinessCheck.
13 14 15 16 17 |
# File 'lib/kettle/family/readiness_check.rb', line 13 def initialize(member:, config: nil, allowed_local_path_roots: []) @member = member @config = config @allowed_local_path_roots = allowed_local_path_roots.filter_map { |path| normalized_path(path) } end |
Class Method Details
.call(member:, config: nil, allowed_local_path_roots: []) ⇒ Object
9 10 11 |
# File 'lib/kettle/family/readiness_check.rb', line 9 def self.call(member:, config: nil, allowed_local_path_roots: []) new(member: member, config: config, allowed_local_path_roots: allowed_local_path_roots).call end |
Instance Method Details
#call ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/kettle/family/readiness_check.rb', line 19 def call diagnostics = [] diagnostics.concat(missing_required_files) diagnostics.concat(missing_required_bins) diagnostics.concat(missing_root_required_files) diagnostics.concat(missing_member_required_dirs) diagnostics.concat(forbidden_tracked_member_dirs) diagnostics.concat(missing_readme_links) diagnostics.concat(local_path_lockfile_entries) result(diagnostics) end |