class Externals::RailsDetector
Public Class Methods
detected?()
click to toggle source
# File lib/externals/project_types/rails.rb, line 19 def self.detected? application_path = File.join('config', 'application.rb') if File.exist?(application_path) open(application_path) do |f| f.read =~ /<\s*Rails::Application/ end else boot_path = File.join('config', 'boot.rb') if File.exist?(boot_path) open(boot_path) do |f| f.read =~ /^\s*module\s+Rails/ end end end end