lib/technologist/rules/gem_rule.rb in technologist-0.3.0 vs lib/technologist/rules/gem_rule.rb in technologist-0.4.0
- old
+ new
@@ -1,13 +1,13 @@
require 'technologist/rules/file_content_rule'
class GemRule < FileContentRule
attr_accessor :gem_name
- def matches?(framework_name, repository)
+ def initialize(framework, attributes = {})
+ super
+
self.file_name = 'Gemfile'
- self.gem_name ||= framework_name.downcase
+ self.gem_name ||= framework.downcase
self.file_content_pattern = /^\s*gem ["']#{gem_name}["']/
-
- super
end
end