itunes_validator 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/itunes_validator.rb +1 -1
- data/lib/itunes_validator/client.rb +4 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 180290e20d6a2e9870ed9ec4a95ae043a67c7245
|
4
|
+
data.tar.gz: 589cf3b96fcbc5cf5771dfa2ca3402ebc614fa48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89c9da7271cf00407765257d39a2b0a05b199b9254380f1da46c14525107e6aa9e2a1ab74f3a9a78c013f522e8ad22cc4191440b85abfe0732e772fb4b5e5f1e
|
7
|
+
data.tar.gz: 7367d2ff7c302155d80aab29996041e2e3b773bff21aa81656981fa2b410b59b072657b3c68ceb25d2cad8cc14ac17e37029c67615239cb166a21fc31692b4ed
|
data/lib/itunes_validator.rb
CHANGED
@@ -16,6 +16,7 @@ module ItunesValidator
|
|
16
16
|
@shared_secret = options[:shared_secret] if options
|
17
17
|
@use_latest = (options[:use_latest] if options) || true
|
18
18
|
@return_latest_too = (options[:return_latest_too] if options) || true
|
19
|
+
@proxy = [options[:proxy_host], options[:proxy_port] || 8080] if options and options[:proxy_host]
|
19
20
|
end
|
20
21
|
|
21
22
|
def validate(receipt_data)
|
@@ -29,7 +30,9 @@ module ItunesValidator
|
|
29
30
|
|
30
31
|
uri = URI(APPSTORE_VERIFY_URL_PRODUCTION)
|
31
32
|
begin
|
32
|
-
Net::HTTP
|
33
|
+
h = Net::HTTP::Proxy(*@proxy) if @proxy
|
34
|
+
h = Net::HTTP unless h
|
35
|
+
h.start(uri.host, uri.port, {use_ssl: true}) do |http|
|
33
36
|
req = Net::HTTP::Post.new(uri.request_uri)
|
34
37
|
req['Accept'] = 'application/json'
|
35
38
|
req['Content-Type'] = 'application/json'
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itunes_validator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Talbot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
description:
|
@@ -45,12 +45,12 @@ require_paths:
|
|
45
45
|
- lib
|
46
46
|
required_ruby_version: !ruby/object:Gem::Requirement
|
47
47
|
requirements:
|
48
|
-
- -
|
48
|
+
- - ">="
|
49
49
|
- !ruby/object:Gem::Version
|
50
50
|
version: '0'
|
51
51
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- -
|
53
|
+
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
56
|
requirements: []
|