I got problems with my current project, so i decided to fix some things of the Gem now (and least for my cases) and ask you if you think that this changes could go into a Gem update.
Why should a object have methods like request_date_ms, request_date_pst? Apple returns them, but its definitely enough to parse the default request_date with Time.parse since Apple returns a string with the Timezone included.
In ruby you can than just say receipt.purchase_date and it will return it in the configured Timezone, if you want to get another one, you can say receipt.purchase_data.in_time_zone("Rome") for example.
THIS IS WORK IN PROGRESS, DO NOT MERGE
I got problems with my current project, so i decided to fix some things of the Gem now (and least for my cases) and ask you if you think that this changes could go into a Gem update.
1. Fix (https://github.com/philipgiuliani/itunes-receipt/commit/2dd48709b3c00c282d813055ecc13008ce5f2e49)
Why should a object have methods like
request_date_ms
,request_date_pst
? Apple returns them, but its definitely enough to parse the defaultrequest_date
withTime.parse
since Apple returns a string with the Timezone included.In ruby you can than just say
receipt.purchase_date
and it will return it in the configured Timezone, if you want to get another one, you can sayreceipt.purchase_data.in_time_zone("Rome")
for example.This fix was applied to:
2. Fix (https://github.com/philipgiuliani/itunes-receipt/commit/7788f63be9972a43f54f8ea518655d53d982ca75)
Since this projects is only Ruby 1.9+ (.travis.yml), i started with updating the Hash syntax to Ruby 1.9 Syntax.
TODO
_ms
and_pst
Questions to @nov
I noticed that the Gem is very out-of-date with the new apple APIs. A lot of the Receipt fields aren't existing anymore and new has been added.
What do you think about updating it an doing a Major Version bump?