apple_models 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/apple_models/version.rb +1 -1
- data/lib/apple_models.rb +34 -30
- metadata +4 -4
data/Gemfile.lock
CHANGED
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
|
|
data/lib/apple_models/version.rb
CHANGED
data/lib/apple_models.rb
CHANGED
@@ -2,36 +2,40 @@ require 'apple_models/version'
|
|
2
2
|
|
3
3
|
module AppleModels
|
4
4
|
@@catalog = {
|
5
|
-
'
|
6
|
-
'
|
7
|
-
'
|
8
|
-
'
|
9
|
-
'
|
10
|
-
'
|
11
|
-
'
|
12
|
-
'
|
13
|
-
'
|
14
|
-
'
|
15
|
-
'
|
16
|
-
'
|
17
|
-
'
|
18
|
-
'
|
19
|
-
'
|
20
|
-
'iPad2,
|
21
|
-
'iPad2,
|
22
|
-
'iPad2,
|
23
|
-
'
|
24
|
-
'
|
25
|
-
'
|
26
|
-
'
|
27
|
-
'iPad3,
|
28
|
-
'iPad3,
|
29
|
-
'
|
30
|
-
'
|
31
|
-
'
|
32
|
-
'
|
33
|
-
'
|
34
|
-
'
|
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.
|
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-
|
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:
|
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:
|
89
|
+
hash: -15962781362183216
|
90
90
|
requirements: []
|
91
91
|
rubyforge_project:
|
92
92
|
rubygems_version: 1.8.24
|