Sha256: f2c3f56782d909257187fb05660d7a87bc22385c9b201cf2514b8eb611ea2202
Contents?: true
Size: 461 Bytes
Versions: 1
Compression:
Stored size: 461 Bytes
Contents
module KeepUp # Filter to update dependency information in a Gemspec. module GemspecFilter def self.apply(contents, dependency) contents.each_line.map do |line| if line =~ /^(.*_dependency[ (](?:['"]|%q.)#{dependency.name}.(?:\.freeze)?, \[?['"](?:~>|=)? *)[^'"]*(['"].*)/m match = Regexp.last_match "#{match[1]}#{dependency.version}#{match[2]}" else line end end.join end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
keep_up-0.4.0 | lib/keep_up/gemspec_filter.rb |