Created
November 1, 2010 19:59
-
-
Save ciryon/658755 to your computer and use it in GitHub Desktop.
Fix for itunes_connect in Swedish iTunes Connect
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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