Class: GemLint::Strategies::CsvAuthorsStrategy

Inherits:
AbstractStrategy show all
Defined in:
lib/gem_lint/strategies/csv_authors_strategy.rb

Instance Attribute Summary

Attributes inherited from AbstractStrategy

#filename, #metadata_path, #path

Instance Method Summary collapse

Methods inherited from AbstractStrategy

#initialize, #level_char

Constructor Details

This class inherits a constructor from GemLint::Strategies::AbstractStrategy

Instance Method Details

#descriptionObject



5
6
7
# File 'lib/gem_lint/strategies/csv_authors_strategy.rb', line 5

def description
  "Authors field in spec uses a comma or semicolon to specify multiple authors instead of an array"
end

#fail?Boolean

Returns:

  • (Boolean)


17
18
19
20
# File 'lib/gem_lint/strategies/csv_authors_strategy.rb', line 17

def fail?
  yaml.authors.is_a?(Array) &&
    (yaml.authors.first.to_s.include?(",") || yaml.authors.first.to_s.include?(";"))
end

#levelObject



13
14
15
# File 'lib/gem_lint/strategies/csv_authors_strategy.rb', line 13

def level
  :error
end

#tagObject



9
10
11
# File 'lib/gem_lint/strategies/csv_authors_strategy.rb', line 9

def tag
  :"csv-authors"
end