itunes_validator 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eccf396503837b383c0c3f976596d998d4fa8f62
4
- data.tar.gz: 9ee21081006cde3f5acfcb346ccf58454a6c1f09
3
+ metadata.gz: 180290e20d6a2e9870ed9ec4a95ae043a67c7245
4
+ data.tar.gz: 589cf3b96fcbc5cf5771dfa2ca3402ebc614fa48
5
5
  SHA512:
6
- metadata.gz: e64dff5caaf1fa0643f4acab76711fa2bca6472a9c2713759fc89daf83ffa562dc70beb591b3f772e7b3e51abfee13b91915e986929ddbee5fcae876374c6e46
7
- data.tar.gz: a0a9d908b9ba5db9d1dc0e21c9592ae4454b8760b3e43c710bcfa30b049c2ac42e581d697d29a6a67143acc68b6c3afe26ff7ff6beba6d9b3544b362f76354b8
6
+ metadata.gz: 89c9da7271cf00407765257d39a2b0a05b199b9254380f1da46c14525107e6aa9e2a1ab74f3a9a78c013f522e8ad22cc4191440b85abfe0732e772fb4b5e5f1e
7
+ data.tar.gz: 7367d2ff7c302155d80aab29996041e2e3b773bff21aa81656981fa2b410b59b072657b3c68ceb25d2cad8cc14ac17e37029c67615239cb166a21fc31692b4ed
@@ -2,5 +2,5 @@ require_relative 'itunes_validator/client'
2
2
  require_relative 'itunes_validator/receipt'
3
3
 
4
4
  module ItunesValidator
5
- VERSION = '0.3.1'
5
+ VERSION = '0.4.0'
6
6
  end
@@ -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.start(uri.host, uri.port, {use_ssl: true}) do |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.3.1
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-08-08 00:00:00.000000000 Z
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: []