apple_warranty_check 0.0.4 → 0.0.5

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: a8ae8d49b03fd384f26c5881fdb88cd4991f0060
4
- data.tar.gz: 29ff64ef828507eba9e6c3a5cc16b1dcac581138
3
+ metadata.gz: 2c251102b73c129aa36d59535824721ac8ba1f66
4
+ data.tar.gz: 156b48d8e486e07520c6300c90bf9c2b0d80e604
5
5
  SHA512:
6
- metadata.gz: caa5b24c5a7e87260b50c5c033d7df85aa530fd62c86e19f7cb2dc4a56df0bdee53e9a6901070b79b821ba46fe4d7eae9b7c7c163af5f93934771f36e8444f23
7
- data.tar.gz: cd29048477c6da11ac9881a09bfc19d967e3625e3a5db0c8b4ecaf5d1b411dc7957c0d037a956bc42830010d27806a193d9f3008e5d8326839fb3a73b810acee
6
+ metadata.gz: 1add8a3b5801ffcc9ada47185c19aa37f1cbaa98f3f1fc0fa1ffdab7f4c26fd5c0e383589615a229918f07d53910f54a842344394fb9848c6c97e93cd3db83f5
7
+ data.tar.gz: e3a12e17c19b53718cc6a8f07ec54822fcb52e2012ec6b2e3327b9891aced6d32a33a7d1eaab14e32505690cebf4e4fd3df1fa44dab43014a506cd47bbc35c04
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![Code Climate](https://codeclimate.com/github/flowerett/apple_warranty_check/badges/gpa.svg)](https://codeclimate.com/github/flowerett/apple_warranty_check)
6
6
  [![Dependency Status](https://gemnasium.com/flowerett/apple_warranty_check.svg)](https://gemnasium.com/flowerett/apple_warranty_check)
7
7
 
8
- Simple tool to get warranty info for Apple devices by it's IMEI.
8
+ Simple tool to get warranty info for Apple devices by it's IMEI from official site.
9
9
 
10
10
  ## Installation
11
11
 
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.email = ["nick.chernyshev@gmail.com"]
10
10
 
11
11
  spec.summary = 'Check Apple warranty by IMEI'
12
- spec.description = 'Tool to parse warranty info for Apple devices from official site.'
12
+ spec.description = "Simple tool to get warranty info for Apple devices by it's IMEI from official site."
13
13
  spec.homepage = "https://github.com/flowerett/apple_warranty_check"
14
14
  spec.license = "MIT"
15
15
 
@@ -21,4 +21,5 @@ Gem::Specification.new do |spec|
21
21
  spec.add_development_dependency "bundler", "~> 1.10"
22
22
  spec.add_development_dependency "rake", "~> 10.0"
23
23
  spec.add_development_dependency "rspec", "~> 3.3.0"
24
+ spec.add_development_dependency "pry"
24
25
  end
data/bin/console CHANGED
@@ -10,5 +10,5 @@ require "apple_warranty_check"
10
10
  # require "pry"
11
11
  # Pry.start
12
12
 
13
- require "irb"
14
- IRB.start
13
+ require "pry"
14
+ Pry.start
@@ -1,3 +1,3 @@
1
1
  module AppleWarrantyCheck
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  describe AppleWarrantyCheck do
4
4
  it 'has a version number' do
5
- expect(AppleWarrantyCheck::VERSION).to eq '0.0.4'
5
+ expect(AppleWarrantyCheck::VERSION).to eq '0.0.5'
6
6
  end
7
7
 
8
8
  let(:valid_warranty_html) { File.open('spec/files/valid_warranty_resp.html').read }
@@ -11,6 +11,23 @@ describe AppleWarrantyCheck do
11
11
 
12
12
  let(:pr) { AppleWarrantyCheck::Process.new() }
13
13
 
14
+ describe '#run' do
15
+ it 'returns active result from apple site' do
16
+ info = AppleWarrantyCheck::Process.new('013977000323877').run
17
+
18
+ expect(info[:product_info][:APIMEINum]).to eq "013977000323877"
19
+ expect(info[:hw_support][:support_status]).to eq 'Active'
20
+ expect(info[:hw_support][:expiration_date]).to eq "August 10, 2016"
21
+ end
22
+
23
+ it 'returns expired result from apple site' do
24
+ info = AppleWarrantyCheck::Process.new('013896000639712').run
25
+
26
+ expect(info[:product_info][:APIMEINum]).to eq "013896000639712"
27
+ expect(info[:hw_support][:support_status]).to eq 'Expired'
28
+ expect(info[:hw_support][:expiration_date]).to be_nil
29
+ end
30
+ end
14
31
 
15
32
  describe '#parse_body' do
16
33
  it 'returns error message from invalid html response' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apple_warranty_check
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Chernyshev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-15 00:00:00.000000000 Z
11
+ date: 2015-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,7 +52,22 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 3.3.0
55
- description: Tool to parse warranty info for Apple devices from official site.
55
+ - !ruby/object:Gem::Dependency
56
+ name: pry
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description: Simple tool to get warranty info for Apple devices by it's IMEI from
70
+ official site.
56
71
  email:
57
72
  - nick.chernyshev@gmail.com
58
73
  executables: