Skip to content
Browse files

fix one REXML bug, warn on another

  • Loading branch information...
1 parent 3eb36dd commit 5d1cd0bf1ddde5c87469c8d882f933cf97258dd3 @sshaw committed Jul 16, 2013
Showing with 6 additions and 1 deletion.
  1. +6 −1 bin/itms
View
7 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

0 comments on commit 5d1cd0b

Please sign in to comment.
Something went wrong with that request. Please try again.