tools/gen.rb in image_voodoo-0.9.0 vs tools/gen.rb in image_voodoo-0.9.1
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
# Used to generate part of metadata.rb. Unfortunately, I am unable to fill
# in appropriate access methods so I generate with get_string and then manually
# update. In future versions I will just run this twice with old and new src
# and manually splice in new data (or fixes).
#
@@ -28,9 +30,10 @@
directories = {}
io.readlines.each do |line|
# .../IptcDirectory.java: public static final int TAG_BY_LINE = 80;
next if %r{Source/[/]?(?<dir_name>.*).java:.*TAG_(?<tag_name>[\S]+)} !~ line
+
directory_name = normalize_directory_name dir_name
directories[directory_name] ||= []
directories[directory_name] << normalize_tag_name(tag_name)
end