From 5d1cd0bf1ddde5c87469c8d882f933cf97258dd3 Mon Sep 17 00:00:00 2001 From: sshaw Date: Tue, 16 Jul 2013 00:15:27 -0400 Subject: [PATCH] fix one REXML bug, warn on another --- bin/itms | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/itms b/bin/itms index 0a7c0c0..ab1b44c 100755 --- a/bin/itms +++ b/bin/itms @@ -104,6 +104,7 @@ module Command end files = [] + warned = false if @assets == true files = asset_info["//asset[ .//*[ @key = 'proxy-encode-url' ]]"] else @@ -113,9 +114,13 @@ module Command xpath = "//asset[ @type = '#{type}'" if regions.any? + if !warned && RUBY_VERSION.start_with?("1.8") + warn "WARNING: you're using Ruby 1.8, which has known problems looking up assets by region, expect problems!" + warned = true + end xpath << " and (%s)" % regions.map { |code| ".//territory = '#{code}'" }.join(" or ") end - xpath << "and .//*[ @key = 'proxy-encode-url' ]]" + xpath << " and .//*[ @key = 'proxy-encode-url' ]]" info = asset_info[xpath] unknown = regions - info.map { |file| file[:territories] }.flatten