itunes_receipt_validator 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bb64fe6c4b032f24bbe415f6e5fff516e0fc2c67
4
- data.tar.gz: 6bd94e68f2be36ca42f87dcc5c957b6da7ba28b7
3
+ metadata.gz: 755ff3261cd2f447381f26db2f8877ce3ea7e40d
4
+ data.tar.gz: 6ce7f72241330d8142e946f1f066de90ac466656
5
5
  SHA512:
6
- metadata.gz: babe035e0c708363250e3465731e8fd24c231a07daf8601c9b6ea72c7d33cadb15292f0c1f24554b15f5197a05df623cb6667756822bf251be2b7f803c9029f7
7
- data.tar.gz: e45871487dcc12e62b99ae40b862a6793574c46ea84e71fda6cda9c361b1010f48d7c99b1f9b3c68334acc21ee8e19a5b13e8d9079ec844312c16001f9a175e4
6
+ metadata.gz: f972f26f8dc7354f421c10a959fd0fa8c26dcf49f9286900239221feb87a3b0e2db87bb1b279b04aa31df1c68e880f1bf766e86a43b4185e51120c859d56cbc9
7
+ data.tar.gz: d75486baa0754ba5c922aaabc094aa6ad0d5368c585e25f658a79d7f0e82acfef8f96244b6048675c22a3046edc8c78310b71decc3e204b1ff653b88275a2ccf
@@ -85,6 +85,8 @@ module ItunesReceiptValidator
85
85
  def remote_transactions_source
86
86
  if style == :unified
87
87
  remote.json.fetch(:latest_receipt_info)
88
+ elsif remote.expired?
89
+ [remote.json.fetch(:latest_expired_receipt_info)]
88
90
  else
89
91
  [remote.json.fetch(:latest_receipt_info)]
90
92
  end
@@ -8,8 +8,8 @@ module ItunesReceiptValidator
8
8
  ##
9
9
  # ItunesReceiptValidator::Receipt
10
10
  class Remote
11
- PRODUCTION_ENDPOINT = 'https://buy.itunes.apple.com/verifyReceipt'
12
- SANDBOX_ENDPOINT = 'https://sandbox.itunes.apple.com/verifyReceipt'
11
+ PRODUCTION_ENDPOINT = 'https://buy.itunes.apple.com/verifyReceipt'.freeze
12
+ SANDBOX_ENDPOINT = 'https://sandbox.itunes.apple.com/verifyReceipt'.freeze
13
13
 
14
14
  attr_reader :receipt
15
15
  attr_accessor :sandbox, :shared_secret, :request_method
@@ -33,7 +33,7 @@ module ItunesReceiptValidator
33
33
  parse_date(hash[:expires_date_ms] || hash[:expires_date])
34
34
  end
35
35
  end
36
- }
36
+ }.freeze
37
37
 
38
38
  attr_reader :id, :original_id, :product_id, :quantity, :first_purchased_at,
39
39
  :purchased_at, :expires_at, :cancelled_at,
@@ -3,5 +3,5 @@
3
3
  module ItunesReceiptValidator
4
4
  ##
5
5
  # Gem version
6
- VERSION = '0.0.5'
6
+ VERSION = '0.0.6'.freeze
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itunes_receipt_validator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - mbaasy.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-24 00:00:00.000000000 Z
11
+ date: 2016-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: itunes_receipt_decoder
@@ -30,28 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.4'
33
+ version: '10.5'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '10.4'
40
+ version: '10.5'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.3'
47
+ version: '3.4'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '3.3'
54
+ version: '3.4'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rubygems-tasks
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.10'
75
+ version: '0.11'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0.10'
82
+ version: '0.11'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: codeclimate-test-reporter
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -100,28 +100,42 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0.33'
103
+ version: '0.37'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0.33'
110
+ version: '0.37'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: webmock
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '1.22'
117
+ version: '1.24'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '1.22'
124
+ version: '1.24'
125
+ - !ruby/object:Gem::Dependency
126
+ name: timecop
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - '='
130
+ - !ruby/object:Gem::Version
131
+ version: '0.8'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - '='
137
+ - !ruby/object:Gem::Version
138
+ version: '0.8'
125
139
  description: |2
126
140
  Validate iTunes Transaction and Unified style receipts with local decoding
127
141
  and remote validation.