53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# File 'lib/jars/lock.rb', line 53
def process( scope )
scope ||= :runtime
File.read( @file ).each_line do |line|
next if not line =~ /:.+:/
jar = JarDetails.new( line.strip.sub( /:jar:/, ':' ).sub( /:$/, ': ' ).split( /:/ ) )
case scope
when :all
yield jar
when :compile
yield jar if jar.scope != :test
when :provided
yield jar if jar.scope == :provided
when :runtime
yield jar if jar.scope != :test and jar.scope != :provided
when :test
yield jar
end
end
end
|