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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 086f27db47c2ed6f529fea9454293d5a18bca2e6
4
- data.tar.gz: 87648ce44ae4fb431961434263cf478c00cec9b2
3
+ metadata.gz: bf482dd76ccd0e9136f3fd11b5c8d4ed66d1ac74
4
+ data.tar.gz: 83775284425d8a329eaef4d7c1f8d8d981c09bed
5
5
  SHA512:
6
- metadata.gz: 7a40fcf34bc2255cba241999f107b0d1ece0a97be9928393bbe93dfc83e63da35dbb0361a51131edb9d5bf3a82624bb7db17b445ec61dd2e626a3264e7c355d1
7
- data.tar.gz: b472ff190e744f59065edd747dae1460bf5eb3518c133a2b06ffc63909cd73b65e8926a0fbacd2a2dd4a7b30129e5fdee7556d8cf43c67ef7915b080d15f723d
6
+ metadata.gz: 2d7cfb3abe81b14de087f6e8ddb0f649c036b1ee4e2d71709f4685960e6c0923e0cdd22f2e3bba56eb69210d1f257759cc1b3c957d1dbecc565dd5589f167eab
7
+ data.tar.gz: 5ce0cb17c4f58753d1c4b96f605438438d145186bee1c993fbd82eb07af99f05406fe95035cb461947bf29aea50feae3d73d3e67c780389280942d11367d6d81
@@ -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 ' ')
@@ -1,3 +1,3 @@
1
1
  module PearWarranty
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
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.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Kalnytsky