Sha256: d49c58f2cd20946e5cbeac6b9f7b5450b098cac8245ca98b0fabe786b02d2b77

Contents?: true

Size: 310 Bytes

Versions: 3

Compression:

Stored size: 310 Bytes

Contents

require 'technologist/rules/file_content_rule'

class GemRule < FileContentRule
  attr_accessor :gem_name

  def matches?(framework_name, repository)
    self.file_name = 'Gemfile'
    self.gem_name ||= framework_name.downcase
    self.file_content_pattern = /^\s*gem ["']#{gem_name}["']/

    super
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
technologist-0.3.0 lib/technologist/rules/gem_rule.rb
technologist-0.2.1 lib/technologist/rules/gem_rule.rb
technologist-0.2.0 lib/technologist/rules/gem_rule.rb