lib/technologist/framework_detector.rb in technologist-0.2.1 vs lib/technologist/framework_detector.rb in technologist-0.3.0
- old
+ new
@@ -1,9 +1,11 @@
require 'yaml'
module Technologist
class FrameworkDetector
+ FRAMEWORK_RULES = File.expand_path('../frameworks.yml', __FILE__)
+
def initialize(repository)
@repository = repository
end
def primary_frameworks
@@ -24,10 +26,10 @@
private
attr_reader :repository
def rules
- @rules ||= YAML.load_file('lib/technologist/frameworks.yml')
+ @rules ||= YAML.load_file(FRAMEWORK_RULES)
end
def matched_frameworks
@frameworks ||=
begin