Class: GemLint::Strategies::RequireMatchesGemnameStrategy
- Inherits:
-
AbstractStrategy
- Object
- AbstractStrategy
- GemLint::Strategies::RequireMatchesGemnameStrategy
- Defined in:
- lib/gem_lint/strategies/require_matches_gemname_strategy.rb
Instance Attribute Summary
Attributes inherited from AbstractStrategy
#filename, #metadata_path, #path
Instance Method Summary collapse
- #description ⇒ Object
-
#fail? ⇒ Boolean
TODO: does thi need to be beefed up to recognise extensions.
- #level ⇒ Object
- #tag ⇒ Object
Methods inherited from AbstractStrategy
Constructor Details
This class inherits a constructor from GemLint::Strategies::AbstractStrategy
Instance Method Details
#description ⇒ Object
7 8 9 |
# File 'lib/gem_lint/strategies/require_matches_gemname_strategy.rb', line 7 def description "Gem cannot be loaded by require '#{preferred_basename.gsub(/^lib\//,'')}'" end |
#fail? ⇒ Boolean
TODO: does thi need to be beefed up to recognise extensions
21 22 23 |
# File 'lib/gem_lint/strategies/require_matches_gemname_strategy.rb', line 21 def fail? !spec.files.include?(preferred_filename) end |
#level ⇒ Object
15 16 17 |
# File 'lib/gem_lint/strategies/require_matches_gemname_strategy.rb', line 15 def level :warning end |
#tag ⇒ Object
11 12 13 |
# File 'lib/gem_lint/strategies/require_matches_gemname_strategy.rb', line 11 def tag :"require-doesnt-match-gemname" end |