apple_models 1.0.0 → 1.0.1

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.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- apple_models (1.0.0)
4
+ apple_models (1.0.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Apple Models [![Build Status](https://travis-ci.org/tboyko/apple_models.png?branch=master)](http://travis-ci.org/tboyko/apple_models)
1
+ # Apple Models [![Build Status](https://travis-ci.org/tboyko/apple_models.png?branch=master)](http://travis-ci.org/tboyko/apple_models) [![Code Climate](https://codeclimate.com/github/tboyko/apple_models.png)](https://codeclimate.com/github/tboyko/apple_models)
2
2
 
3
3
  Retrieve the model name of an Apple product based on the model id. __Note:__ the model id is also referred to as the product code and the product id.
4
4
 
@@ -1,3 +1,3 @@
1
1
  module AppleModels
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
data/lib/apple_models.rb CHANGED
@@ -2,36 +2,40 @@ require 'apple_models/version'
2
2
 
3
3
  module AppleModels
4
4
  @@catalog = {
5
- 'iPhone1,1' => 'iPhone 2G',
6
- 'iPhone1,2' => 'iPhone 3G',
7
- 'iPhone2,1' => 'iPhone 3GS',
8
- 'iPhone3,1' => 'iPhone 4',
9
- 'iPhone3,2' => 'iPhone 4', # CDMA Prototype
10
- 'iPhone3,3' => 'iPhone 4', # CDMA
11
- 'iPhone4,1' => 'iPhone 4S',
12
- 'iPhone5,1' => 'iPhone 5',
13
- 'iPhone5,2' => 'iPhone 5',
14
- 'iProd0,1' => 'iPad', # Prototype
15
- 'iPad1,1' => 'iPad', # WiFi and WiFi + Cellular models use same product code
16
- 'iPad2,1' => 'iPad 2', # WiFi
17
- 'iPad2,2' => 'iPad 2', # WiFi + Cellular, GSM
18
- 'iPad2,3' => 'iPad 2', # WiFi + Cellular, CDMA
19
- 'iPad2,4' => 'iPad 2', # WiFi, unannounced internal chipset change of iPad2,1
20
- 'iPad2,5' => 'iPad Mini', # WiFi
21
- 'iPad2,6' => 'iPad Mini', # WiFi + Cellular
22
- 'iPad2,7' => 'iPad Mini', # WiFi + Cellular, Verizon
23
- 'iPad3,1' => 'iPad 3',
24
- 'iPad3,2' => 'iPad 3', # WiFi + Cellular, AT&T
25
- 'iPad3,3' => 'iPad 3', # WiFi + Cellular, Verizon
26
- 'iPad3,4' => 'iPad 4', # WiFi
27
- 'iPad3,5' => 'iPad 4', # WiFi + Cellular, AT&T
28
- 'iPad3,6' => 'iPad 4', # WiFi + Cellular, Verizon & Sprint
29
- 'iPod1,1' => 'iPod Touch 1G',
30
- 'iPod2,1' => 'iPod Touch 2G',
31
- 'iPod2,2' => 'iPod Touch 3G', # Prototype
32
- 'iPod3,1' => 'iPod Touch 3G',
33
- 'iPod4,1' => 'iPod Touch 4G',
34
- 'iPod5,1' => 'iPod Touch 5G'
5
+ 'AppleTV1,1' => 'Apple TV 1',
6
+ 'AppleTV2,1' => 'Apple TV 2',
7
+ 'AppleTV3,1' => 'Apple TV 3',
8
+ 'AppleTV3,2' => 'Apple TV 3',
9
+ 'iPhone1,1' => 'iPhone 2G',
10
+ 'iPhone1,2' => 'iPhone 3G',
11
+ 'iPhone2,1' => 'iPhone 3GS',
12
+ 'iPhone3,1' => 'iPhone 4',
13
+ 'iPhone3,2' => 'iPhone 4', # CDMA Prototype
14
+ 'iPhone3,3' => 'iPhone 4', # CDMA
15
+ 'iPhone4,1' => 'iPhone 4S',
16
+ 'iPhone5,1' => 'iPhone 5',
17
+ 'iPhone5,2' => 'iPhone 5',
18
+ 'iProd0,1' => 'iPad', # Prototype
19
+ 'iPad1,1' => 'iPad', # WiFi and WiFi + Cellular models use same product code
20
+ 'iPad2,1' => 'iPad 2', # WiFi
21
+ 'iPad2,2' => 'iPad 2', # WiFi + Cellular, GSM
22
+ 'iPad2,3' => 'iPad 2', # WiFi + Cellular, CDMA
23
+ 'iPad2,4' => 'iPad 2', # WiFi, unannounced internal chipset change of iPad2,1
24
+ 'iPad2,5' => 'iPad Mini', # WiFi
25
+ 'iPad2,6' => 'iPad Mini', # WiFi + Cellular
26
+ 'iPad2,7' => 'iPad Mini', # WiFi + Cellular, Verizon
27
+ 'iPad3,1' => 'iPad 3',
28
+ 'iPad3,2' => 'iPad 3', # WiFi + Cellular, AT&T
29
+ 'iPad3,3' => 'iPad 3', # WiFi + Cellular, Verizon
30
+ 'iPad3,4' => 'iPad 4', # WiFi
31
+ 'iPad3,5' => 'iPad 4', # WiFi + Cellular, AT&T
32
+ 'iPad3,6' => 'iPad 4', # WiFi + Cellular, Verizon & Sprint
33
+ 'iPod1,1' => 'iPod Touch 1G',
34
+ 'iPod2,1' => 'iPod Touch 2G',
35
+ 'iPod2,2' => 'iPod Touch 3G', # Prototype
36
+ 'iPod3,1' => 'iPod Touch 3G',
37
+ 'iPod4,1' => 'iPod Touch 4G',
38
+ 'iPod5,1' => 'iPod Touch 5G'
35
39
  }
36
40
 
37
41
  def self.find(product_id)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apple_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-03 00:00:00.000000000 Z
12
+ date: 2013-09-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -77,7 +77,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
77
77
  version: '0'
78
78
  segments:
79
79
  - 0
80
- hash: 2239846394275850721
80
+ hash: -15962781362183216
81
81
  required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  none: false
83
83
  requirements:
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
86
  version: '0'
87
87
  segments:
88
88
  - 0
89
- hash: 2239846394275850721
89
+ hash: -15962781362183216
90
90
  requirements: []
91
91
  rubyforge_project:
92
92
  rubygems_version: 1.8.24