pear_warranty 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: af3fb16995e70b3178bbe920960c6a1eaf15161e
4
- data.tar.gz: 4da1d3e4c939c991994dcf93102746aea0a902af
3
+ metadata.gz: d02cfd647347b554ae3f5cadbaa2112026de3565
4
+ data.tar.gz: 0301c37701a36369fcb8f6fc85626f98c9297995
5
5
  SHA512:
6
- metadata.gz: 00b26519eefa0383d9ec5b675353fb0e81b6771139e5e93f9c97227193abbcfab826c4e9baafe509a732fb3bb2920b7f9a438c555468a147dc9e11ed2a983913
7
- data.tar.gz: defd02c20dddb5e06ec85ab4d3fec81f6867ca2e44510bea0c673e8de0d6c2119ec5d4f1d9c327d22d3a6dc00a2d40935d31cc53c746256c738eec39ed5f4c7f
6
+ metadata.gz: 74f6407b991dae65ebeceb6523cb78598927189163516242f88f857c8b920bc04d51320afb35475700c44cb0757232132dbaeb9a0915e9259a7e8c5c50c6d27d
7
+ data.tar.gz: a50b83b0c678485c22548f5fae3864518cdfbdc6e7a706a93f28169c59743516b5a49033ca64b35b337451d070152714c5ccf6a9376bc72eeea1233a1a04c0a6
data/lib/pear_warranty.rb CHANGED
@@ -9,7 +9,7 @@ module PearWarranty
9
9
 
10
10
  def self.check(serial, proxy_index = nil)
11
11
  agent = Mechanize.new
12
- proxy_index ||= rand(COOKIES.size)
12
+ proxy_index ||= rand(PROXIES.size)
13
13
  page = nil
14
14
  error = true
15
15
  apple_url = "https://selfsolve.apple.com/wcResults.do?sn=#{serial}&Continue=Continue&num=0"
@@ -19,7 +19,7 @@ module PearWarranty
19
19
  begin
20
20
  page = agent.submit(form)
21
21
  rescue Net::HTTP::Persistent::Error
22
- proxy_index = rand(COOKIES.size)
22
+ proxy_index = rand(PROXIES.size)
23
23
  next
24
24
  end
25
25
  page = page.body
@@ -27,7 +27,7 @@ module PearWarranty
27
27
  error = false
28
28
  break
29
29
  end
30
- proxy_index = rand(COOKIES.size)
30
+ proxy_index = rand(PROXIES.size)
31
31
  end
32
32
  if error
33
33
  {error: 'Problem with proxy'}
@@ -1,3 +1,3 @@
1
1
  module PearWarranty
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pear_warranty
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
  - Roman Kalnytsky