ios-devices 0.2.9 → 0.2.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.ruby-version +1 -1
- data/.travis.yml +3 -2
- data/ios-devices.gemspec +2 -2
- data/lib/ios/devices/version.rb +1 -1
- data/lib/ios/devices.rb +118 -2
- data/spec/ios_devices_spec.rb +10 -1
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '097138863ae81d07c5060ab426bc5cb7249fff2fff608310e500e3ebdd80d036'
|
4
|
+
data.tar.gz: ecf13be69c71effe1c7dd542e2c0db6ea550a5cca456ba2d69197ea806f4e2df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32eeed954a8a23a9603dbb58f43f7d50c6b9158035b41dd3e1dda56379e41547f5dd9e7cdeae8987a73becadc5e6af6d1c914e340c7235550b6b2ae63d10683b
|
7
|
+
data.tar.gz: 34a24d1babd3a516940995414fd1f07a036b781142debc5fb2920d1debbc274f563310d292b48ad9ee2c99f4391447c08995ca6c4da6271f5b0e345067595a0c
|
data/.gitignore
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.5.
|
1
|
+
2.5.8
|
data/.travis.yml
CHANGED
data/ios-devices.gemspec
CHANGED
@@ -22,8 +22,8 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
23
23
|
spec.require_paths = ['lib']
|
24
24
|
|
25
|
-
spec.add_development_dependency 'bundler', '~> 2.
|
26
|
-
spec.add_development_dependency 'rake', '
|
25
|
+
spec.add_development_dependency 'bundler', '~> 2.2.5'
|
26
|
+
spec.add_development_dependency 'rake', '>= 12.3.3'
|
27
27
|
spec.add_development_dependency 'pry'
|
28
28
|
spec.add_development_dependency 'rspec'
|
29
29
|
end
|
data/lib/ios/devices/version.rb
CHANGED
data/lib/ios/devices.rb
CHANGED
@@ -18,7 +18,7 @@ module Ios
|
|
18
18
|
# This list was taken from here:
|
19
19
|
# http://support.hockeyapp.net/kb/client-integration-ios-mac-os-x/ios-device-types
|
20
20
|
case device_type
|
21
|
-
when 'x86_64'
|
21
|
+
when 'i386', 'x86_64', 'arm64'
|
22
22
|
Model.new(device_type, 'iOS Simulator')
|
23
23
|
when 'iPhone1,1'
|
24
24
|
Model.new(device_type, 'iPhone')
|
@@ -28,6 +28,8 @@ module Ios
|
|
28
28
|
Model.new(device_type, 'iPhone 3GS')
|
29
29
|
when 'iPhone3,1'
|
30
30
|
Model.new(device_type, 'iPhone 4', 'GSM')
|
31
|
+
when 'iPhone3,2'
|
32
|
+
Model.new(device_type, 'iPhone 4', 'GSM Rev A')
|
31
33
|
when 'iPhone3,3'
|
32
34
|
Model.new(device_type, 'iPhone 4', 'CDMA')
|
33
35
|
when 'iPhone4,1'
|
@@ -60,7 +62,7 @@ module Ios
|
|
60
62
|
Model.new(device_type, 'iPhone X')
|
61
63
|
when 'iPhone11,2'
|
62
64
|
Model.new(device_type, 'iPhone XS')
|
63
|
-
when 'iPhone11,6'
|
65
|
+
when 'iPhone11,4', 'iPhone11,6'
|
64
66
|
Model.new(device_type, 'iPhone XS Max')
|
65
67
|
when 'iPhone11,8'
|
66
68
|
Model.new(device_type, 'iPhone XR')
|
@@ -70,6 +72,24 @@ module Ios
|
|
70
72
|
Model.new(device_type, 'iPhone 11 Pro')
|
71
73
|
when 'iPhone12,5'
|
72
74
|
Model.new(device_type, 'iPhone 11 Pro Max')
|
75
|
+
when 'iPhone12,8'
|
76
|
+
Model.new(device_type, 'iPhone SE', '2nd gen')
|
77
|
+
when 'iPhone13,1'
|
78
|
+
Model.new(device_type, 'iPhone 12 Mini')
|
79
|
+
when 'iPhone13,2'
|
80
|
+
Model.new(device_type, 'iPhone 12')
|
81
|
+
when 'iPhone13,3'
|
82
|
+
Model.new(device_type, 'iPhone 12 Pro')
|
83
|
+
when 'iPhone13,4'
|
84
|
+
Model.new(device_type, 'iPhone 12 Pro Max')
|
85
|
+
when 'iPhone14,2'
|
86
|
+
Model.new(device_type, 'iPhone 13 Pro')
|
87
|
+
when 'iPhone14,3'
|
88
|
+
Model.new(device_type, 'iPhone 13 Pro Max')
|
89
|
+
when 'iPhone14,4'
|
90
|
+
Model.new(device_type, 'iPhone 13 Mini')
|
91
|
+
when 'iPhone14,5'
|
92
|
+
Model.new(device_type, 'iPhone 13')
|
73
93
|
when 'iPad1,1'
|
74
94
|
Model.new(device_type, 'iPad')
|
75
95
|
when 'iPad2,1'
|
@@ -142,6 +162,10 @@ module Ios
|
|
142
162
|
Model.new(device_type, 'iPad', '6rd gen, Wi-Fi')
|
143
163
|
when 'iPad7,6'
|
144
164
|
Model.new(device_type, 'iPad', '6rd gen, Wi-Fi+LTE')
|
165
|
+
when 'iPad7,11'
|
166
|
+
Model.new(device_type, 'iPad 10.2"', '7th gen, Wi-Fi')
|
167
|
+
when 'iPad7,12'
|
168
|
+
Model.new(device_type, 'iPad 10.2"', '7th gen, Wi-Fi+LTE')
|
145
169
|
when 'iPad8,1'
|
146
170
|
Model.new(device_type, 'iPad Pro 11"', 'Wi-Fi')
|
147
171
|
when 'iPad8,2'
|
@@ -158,6 +182,14 @@ module Ios
|
|
158
182
|
Model.new(device_type, 'iPad Pro 12.9"', '3nd gen, Wi-Fi+LTE')
|
159
183
|
when 'iPad8,8'
|
160
184
|
Model.new(device_type, 'iPad Pro 12.9"', '3nd gen, Wi-Fi+LTE')
|
185
|
+
when 'iPad8,9'
|
186
|
+
Model.new(device_type, 'iPad Pro 11"', '2nd gen, Wi-Fi')
|
187
|
+
when 'iPad8,10'
|
188
|
+
Model.new(device_type, 'iPad Pro 11"', '2nd gen, Wi-Fi+LTE')
|
189
|
+
when 'iPad8,11'
|
190
|
+
Model.new(device_type, 'iPad Pro 12.9"', '4th gen, Wi-Fi')
|
191
|
+
when 'iPad8,12'
|
192
|
+
Model.new(device_type, 'iPad Pro 12.9"', '4th gen, Wi-Fi+LTE')
|
161
193
|
when 'iPad11,1'
|
162
194
|
Model.new(device_type, 'iPad mini 5', 'Wi-Fi')
|
163
195
|
when 'iPad11,2'
|
@@ -166,6 +198,30 @@ module Ios
|
|
166
198
|
Model.new(device_type, 'iPad Air 3', 'Wi-Fi')
|
167
199
|
when 'iPad11,4'
|
168
200
|
Model.new(device_type, 'iPad Air 3', 'Wi-Fi+LTE')
|
201
|
+
when 'iPad11,6'
|
202
|
+
Model.new(device_type, 'iPad', '8th gen, Wi-Fi')
|
203
|
+
when 'iPad11,7'
|
204
|
+
Model.new(device_type, 'iPad', '8th gen, Wi-Fi+LTE')
|
205
|
+
when 'iPad12,1'
|
206
|
+
Model.new(device_type, 'iPad', '9th gen, Wi-Fi')
|
207
|
+
when 'iPad12,2'
|
208
|
+
Model.new(device_type, 'iPad', '9th gen, Wi-Fi+LTE')
|
209
|
+
when 'iPad13,1'
|
210
|
+
Model.new(device_type, 'iPad Air 4', 'Wi-Fi')
|
211
|
+
when 'iPad13,2'
|
212
|
+
Model.new(device_type, 'iPad Air 4', 'Wi-Fi+LTE')
|
213
|
+
when 'iPad13,4'
|
214
|
+
Model.new(device_type, 'iPad Pro 11"', '3rd gen, Wi-Fi')
|
215
|
+
when 'iPad13,5', 'iPad13,6', 'iPad13,7'
|
216
|
+
Model.new(device_type, 'iPad Pro 11"', '3rd gen, Wi-Fi+LTE')
|
217
|
+
when 'iPad13,8'
|
218
|
+
Model.new(device_type, 'iPad Pro 12.9"', '5th gen, Wi-Fi')
|
219
|
+
when 'iPad13,9', 'iPad13,10', 'iPad13,11'
|
220
|
+
Model.new(device_type, 'iPad Pro 12.9"', '5th gen, Wi-Fi+LTE')
|
221
|
+
when 'iPad14,1'
|
222
|
+
Model.new(device_type, 'iPad mini 6', 'Wi-Fi')
|
223
|
+
when 'iPad14,2'
|
224
|
+
Model.new(device_type, 'iPad mini 6', 'Wi-Fi+LTE')
|
169
225
|
when 'iPod1,1'
|
170
226
|
Model.new(device_type, 'iPod touch')
|
171
227
|
when 'iPod2,1'
|
@@ -180,6 +236,66 @@ module Ios
|
|
180
236
|
Model.new(device_type, 'iPod touch', '6th gen')
|
181
237
|
when 'iPod9,1'
|
182
238
|
Model.new(device_type, 'iPod touch', '7th gen')
|
239
|
+
when 'Watch1,1'
|
240
|
+
Model.new(device_type, 'Apple Watch', '38mm')
|
241
|
+
when 'Watch1,2'
|
242
|
+
Model.new(device_type, 'Apple Watch', '42mm')
|
243
|
+
when 'Watch2,6'
|
244
|
+
Model.new(device_type, 'Apple Watch', 'Series 1, 38mm')
|
245
|
+
when 'Watch2,7'
|
246
|
+
Model.new(device_type, 'Apple Watch', 'Series 1, 42mm')
|
247
|
+
when 'Watch2,3'
|
248
|
+
Model.new(device_type, 'Apple Watch', 'Series 2, 38mm')
|
249
|
+
when 'Watch2,4'
|
250
|
+
Model.new(device_type, 'Apple Watch', 'Series 2, 42mm')
|
251
|
+
when 'Watch3,1'
|
252
|
+
Model.new(device_type, 'Apple Watch', 'Series 3, 38mm, GPS+Cellular')
|
253
|
+
when 'Watch3,2'
|
254
|
+
Model.new(device_type, 'Apple Watch', 'Series 3, 42mm, GPS+Cellular')
|
255
|
+
when 'Watch3,3'
|
256
|
+
Model.new(device_type, 'Apple Watch', 'Series 3, 38mm, GPS')
|
257
|
+
when 'Watch3,4'
|
258
|
+
Model.new(device_type, 'Apple Watch', 'Series 3, 42mm, GPS')
|
259
|
+
when 'Watch4,1'
|
260
|
+
Model.new(device_type, 'Apple Watch', 'Series 4, 40mm, GPS')
|
261
|
+
when 'Watch4,2'
|
262
|
+
Model.new(device_type, 'Apple Watch', 'Series 4, 44mm, GPS')
|
263
|
+
when 'Watch4,3'
|
264
|
+
Model.new(device_type, 'Apple Watch', 'Series 4, 40mm, GPS+Cellular')
|
265
|
+
when 'Watch4,4'
|
266
|
+
Model.new(device_type, 'Apple Watch', 'Series 4, 44mm, GPS+Cellular')
|
267
|
+
when 'Watch5,1'
|
268
|
+
Model.new(device_type, 'Apple Watch', 'Series 5, 40mm, GPS')
|
269
|
+
when 'Watch5,2'
|
270
|
+
Model.new(device_type, 'Apple Watch', 'Series 5, 44mm, GPS')
|
271
|
+
when 'Watch5,3'
|
272
|
+
Model.new(device_type, 'Apple Watch', 'Series 5, 40mm, GPS+Cellular')
|
273
|
+
when 'Watch5,4'
|
274
|
+
Model.new(device_type, 'Apple Watch', 'Series 5, 44mm, GPS+Cellular')
|
275
|
+
when 'Watch5,9'
|
276
|
+
Model.new(device_type, 'Apple Watch', 'SE, 40mm, GPS')
|
277
|
+
when 'Watch5,10'
|
278
|
+
Model.new(device_type, 'Apple Watch', 'SE, 44mm, GPS')
|
279
|
+
when 'Watch5,11'
|
280
|
+
Model.new(device_type, 'Apple Watch', 'SE, 40mm, GPS+Cellular')
|
281
|
+
when 'Watch5,12'
|
282
|
+
Model.new(device_type, 'Apple Watch', 'SE, 44mm, GPS+Cellular')
|
283
|
+
when 'Watch6,1'
|
284
|
+
Model.new(device_type, 'Apple Watch', 'Series 6, 40mm, GPS')
|
285
|
+
when 'Watch6,2'
|
286
|
+
Model.new(device_type, 'Apple Watch', 'Series 6, 44mm, GPS')
|
287
|
+
when 'Watch6,3'
|
288
|
+
Model.new(device_type, 'Apple Watch', 'Series 6, 40mm, GPS+Cellular')
|
289
|
+
when 'Watch6,4'
|
290
|
+
Model.new(device_type, 'Apple Watch', 'Series 6, 44mm, GPS+Cellular')
|
291
|
+
when 'Watch6,6'
|
292
|
+
Model.new(device_type, 'Apple Watch', 'Series 7, 41mm, GPS')
|
293
|
+
when 'Watch6,7'
|
294
|
+
Model.new(device_type, 'Apple Watch', 'Series 7, 45mm, GPS')
|
295
|
+
when 'Watch6,8'
|
296
|
+
Model.new(device_type, 'Apple Watch', 'Series 7, 41mm, GPS+Cellular')
|
297
|
+
when 'Watch6,9'
|
298
|
+
Model.new(device_type, 'Apple Watch', 'Series 7, 45mm, GPS+Cellular')
|
183
299
|
else
|
184
300
|
Model.new(device_type, 'Unknown iOS device')
|
185
301
|
end
|
data/spec/ios_devices_spec.rb
CHANGED
@@ -4,6 +4,8 @@ require 'spec_helper'
|
|
4
4
|
|
5
5
|
describe Ios::Devices do
|
6
6
|
describe '.search' do
|
7
|
+
subject(:model) { Ios::Devices.search(input) }
|
8
|
+
|
7
9
|
it 'returns a model object' do
|
8
10
|
model = Ios::Devices.search('iPhone6,2')
|
9
11
|
|
@@ -18,9 +20,16 @@ describe Ios::Devices do
|
|
18
20
|
end
|
19
21
|
|
20
22
|
it 'returns a model object with "Unknown iOS device" for unknown device types' do
|
21
|
-
model = Ios::Devices.search('iPad8,
|
23
|
+
model = Ios::Devices.search('iPad8,13')
|
22
24
|
|
23
25
|
expect(model.name).to eq('Unknown iOS device')
|
24
26
|
end
|
27
|
+
|
28
|
+
context 'with Apple Watch5,4' do
|
29
|
+
let(:input) { 'Watch5,4' }
|
30
|
+
|
31
|
+
it { expect(model.name).to eq('Apple Watch') }
|
32
|
+
it { expect(model.extra).to eq('Series 5, 44mm, GPS+Cellular') }
|
33
|
+
end
|
25
34
|
end
|
26
35
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ios-devices
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ricardo Otero
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.2.5
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
26
|
+
version: 2.2.5
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 12.3.3
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 12.3.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: pry
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -93,7 +93,7 @@ homepage: http://github.com/rikas/iosdevices
|
|
93
93
|
licenses:
|
94
94
|
- MIT
|
95
95
|
metadata: {}
|
96
|
-
post_install_message:
|
96
|
+
post_install_message:
|
97
97
|
rdoc_options: []
|
98
98
|
require_paths:
|
99
99
|
- lib
|
@@ -108,9 +108,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
|
-
rubyforge_project:
|
111
|
+
rubyforge_project:
|
112
112
|
rubygems_version: 2.7.6.2
|
113
|
-
signing_key:
|
113
|
+
signing_key:
|
114
114
|
specification_version: 4
|
115
115
|
summary: iOS device model translation from Apple device types.
|
116
116
|
test_files:
|