Created
February 1, 2013 14:06
-
-
Save yamanyar/4691494 to your computer and use it in GitHub Desktop.
A simple report transformer for https://github.com/yamanyar/restrict-maven-plugin/wiki/About-restrict-maven-plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local_filename = "d:\\codes\\harmony\\back-end\\target\\restrict-maven-plugin.txt" | |
File.open(local_filename, 'r') do |f| | |
paket = nil | |
while line = f.gets | |
if line.start_with?("Restricted access from") | |
tokens = line.split(/\(|\)/) | |
paket_suan = tokens[1][tokens[1].rindex(/\\/)+1..-1] | |
if paket_suan != paket | |
paket = paket_suan | |
puts "<br\><br\>" | |
puts "</ul>" if (paket != nil) | |
puts "<h2>#{paket}:</h2><ul>" | |
end | |
puts "<li>#{tokens[2][1..-1]}</li>" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment