pear_warranty 0.0.1 → 0.0.2
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 +4 -4
- data/lib/pear_warranty.rb +2 -1
- data/lib/pear_warranty/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf482dd76ccd0e9136f3fd11b5c8d4ed66d1ac74
|
4
|
+
data.tar.gz: 83775284425d8a329eaef4d7c1f8d8d981c09bed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d7cfb3abe81b14de087f6e8ddb0f649c036b1ee4e2d71709f4685960e6c0923e0cdd22f2e3bba56eb69210d1f257759cc1b3c957d1dbecc565dd5589f167eab
|
7
|
+
data.tar.gz: 5ce0cb17c4f58753d1c4b96f605438438d145186bee1c993fbd82eb07af99f05406fe95035cb461947bf29aea50feae3d73d3e67c780389280942d11367d6d81
|
data/lib/pear_warranty.rb
CHANGED
@@ -30,9 +30,10 @@ module PearWarranty
|
|
30
30
|
if error
|
31
31
|
{error: 'Problem with proxy'}
|
32
32
|
else
|
33
|
-
if page =~ /but this serial number is not valid/
|
33
|
+
if page =~ /(but this serial number is not valid)|(but the serial number you have provided cannot be found in our records)/
|
34
34
|
{ error: 'There is no such imei or service is not available at this moment' }
|
35
35
|
else
|
36
|
+
puts page.split('warrantyPage.warrantycheck.displayPHSupportInfo')
|
36
37
|
text = page.split('warrantyPage.warrantycheck.displayPHSupportInfo')[1].scan(/\(.*\)/)[0].delete('()')
|
37
38
|
params = text.split(', ')
|
38
39
|
warranty = to_boolean(params.first.delete ' ')
|