Module: LintFu::Plugins::Rails
- Defined in:
- lib/lint_fu/plugins/rails.rb,
lib/lint_fu/plugins/rails/issue_builder.rb,
lib/lint_fu/plugins/rails/model_application.rb,
lib/lint_fu/plugins/rails/unsafe_find_checker.rb,
lib/lint_fu/plugins/rails/sql_injection_checker.rb,
lib/lint_fu/plugins/rails/buggy_eager_load_checker.rb,
lib/lint_fu/plugins/rails/model_application_factory.rb
Defined Under Namespace
Classes: BuggyEagerLoad, BuggyEagerLoadChecker, IssueBuilder, ModelApplication, ModelApplicationFactory, SqlInjection, SqlInjectionChecker, UnsafeFind, UnsafeFindChecker
Class Method Summary
collapse
Class Method Details
.applies_to?(dir) ⇒ Boolean
13
14
15
16
17
|
# File 'lib/lint_fu/plugins/rails.rb', line 13
def self.applies_to?(dir)
File.exist?(File.join(dir, 'app')) &&
File.exist?(File.join(dir, 'config', 'environments')) &&
File.exist?(File.join(dir, 'config', 'environment.rb'))
end
|
.context_builder_for(dir) ⇒ Object
19
20
21
22
|
# File 'lib/lint_fu/plugins/rails.rb', line 19
def self.context_builder_for(dir)
return nil unless applies_to?(dir)
ModelApplicationFactory.new(dir)
end
|
.issue_builder_for(dir) ⇒ Object
24
25
26
27
|
# File 'lib/lint_fu/plugins/rails.rb', line 24
def self.issue_builder_for(dir)
return nil unless applies_to?(dir)
IssueBuilder.new(dir)
end
|