lib/irrc/whoisd/api.rb in irrc-0.2.1 vs lib/irrc/whoisd/api.rb in irrc-0.2.2

- old
+ new

@@ -12,11 +12,11 @@ def parse_objects_from_set(result) if result =~ error_code raise $1 end - result.scan(Irrc::Irr.members_tag).flatten.map {|i| i.split /\s*,?\s+/ }.flatten + result.scan(Irrc::Irr.members_tag).flatten.map {|i| i.split(/\s*,?\s+/)}.flatten end def expand_route_set_command(route_set, sources) if sources && !sources.empty? "-k -r -s #{sources.join(',')} -T route-set #{route_set}" @@ -28,10 +28,10 @@ def expand_aut_num_command(autnum, sources) "-k -r #{source_option(sources)} -K -i origin #{autnum}" end def parse_prefixes_from_aut_num(result, protocol) - result.scan(Irrc::Irr.route_tag(protocol)).flatten.uniq + result.scan(Irrc::Irr.route_tag(protocol)).flatten.uniq end # See http://www.ripe.net/data-tools/support/documentation/ripe-database-query-reference-manual#a1--ripe-database-query-server-response-codes-and-messages for the error code def error_code /^%ERROR:(.*)$/