Class: GemLint::Strategies::RubyFileLocationStrategy
Instance Attribute Summary
#filename, #metadata_path, #path
Instance Method Summary
collapse
#initialize, #level_char
Instance Method Details
#description ⇒ Object
7
8
9
|
# File 'lib/gem_lint/strategies/ruby_file_location_strategy.rb', line 7
def description
"Gem contains ruby files outside of lib, test and spec"
end
|
#fail? ⇒ Boolean
19
20
21
22
23
24
|
# File 'lib/gem_lint/strategies/ruby_file_location_strategy.rb', line 19
def fail?
all_files.any? do |filename|
filename[0,3] != "lib" && filename[0,4] != "spec" &&
filename[0,4] != "test" && filename[-3,3] == ".rb"
end
end
|
#level ⇒ Object
15
16
17
|
# File 'lib/gem_lint/strategies/ruby_file_location_strategy.rb', line 15
def level
:warning
end
|
#tag ⇒ Object
11
12
13
|
# File 'lib/gem_lint/strategies/ruby_file_location_strategy.rb', line 11
def tag
:"ruby-files-outside-lib-test-spec"
end
|