Skip to content

Instantly share code, notes, and snippets.

@ciryon
Created November 1, 2010 19:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ciryon/658755 to your computer and use it in GitHub Desktop.
Save ciryon/658755 to your computer and use it in GitHub Desktop.
Fix for itunes_connect in Swedish iTunes Connect
def initialize(input)
@data = Hash.new { |h,k| h[k] = { }}
input.each do |line|
line.chomp!
next if line =~ /^(Provider|$)/
tokens = line.split(/\t/)
country = tokens[12]
count = tokens[7].to_i
@data[country][:date] = Date.parse(tokens[9])
type = tokens[6]
if type.match(/^7/)
@data[country][:upgrade] = count
end
if type.match(/^1/)
@data[country][:install] = count
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment