ios-devices 0.2.9 → 0.2.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -1
- data/ios-devices.gemspec +1 -1
- data/lib/ios/devices.rb +36 -0
- data/lib/ios/devices/version.rb +1 -1
- data/spec/ios_devices_spec.rb +9 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17a161929dfdc9677e26df6edca907a0acf0707d0283cab1904fa85aea49f049
|
4
|
+
data.tar.gz: 99f11b0de53e00a72c94cc5b4bdc9c48b7f333a372e176572c9b8a7d04dd2c33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97fa19c09aab38bc5582d535fe06994e2a8c395e1727929febc24f46cdc3f32531acfdba884804b5dd67cef8c5e6e10455cdd935cdbc53d26f002818b38616a5
|
7
|
+
data.tar.gz: fefcb76965e2d15c6f30d1187cd41bfeef6819fe41a01fd2fc18328deb4545f6a2a8b40fa746a89cc95d140837e27c674b9ba483bd5b7d8f6fe109972c09cb41
|
data/.travis.yml
CHANGED
data/ios-devices.gemspec
CHANGED
@@ -22,7 +22,7 @@ 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.
|
25
|
+
spec.add_development_dependency 'bundler', '~> 2.1.2'
|
26
26
|
spec.add_development_dependency 'rake', '~> 10.0'
|
27
27
|
spec.add_development_dependency 'pry'
|
28
28
|
spec.add_development_dependency 'rspec'
|
data/lib/ios/devices.rb
CHANGED
@@ -180,6 +180,42 @@ module Ios
|
|
180
180
|
Model.new(device_type, 'iPod touch', '6th gen')
|
181
181
|
when 'iPod9,1'
|
182
182
|
Model.new(device_type, 'iPod touch', '7th gen')
|
183
|
+
when 'Watch1,1'
|
184
|
+
Model.new(device_type, 'Apple Watch', '38mm')
|
185
|
+
when 'Watch1,2'
|
186
|
+
Model.new(device_type, 'Apple Watch', '42mm')
|
187
|
+
when 'Watch2,6'
|
188
|
+
Model.new(device_type, 'Apple Watch', 'Series 1, 38mm')
|
189
|
+
when 'Watch2,7'
|
190
|
+
Model.new(device_type, 'Apple Watch', 'Series 1, 42mm')
|
191
|
+
when 'Watch2,3'
|
192
|
+
Model.new(device_type, 'Apple Watch', 'Series 2, 38mm')
|
193
|
+
when 'Watch2,4'
|
194
|
+
Model.new(device_type, 'Apple Watch', 'Series 2, 42mm')
|
195
|
+
when 'Watch3,1'
|
196
|
+
Model.new(device_type, 'Apple Watch', 'Series 3, 38mm, GPS+Cellular')
|
197
|
+
when 'Watch3,2'
|
198
|
+
Model.new(device_type, 'Apple Watch', 'Series 3, 42mm, GPS+Cellular')
|
199
|
+
when 'Watch3,3'
|
200
|
+
Model.new(device_type, 'Apple Watch', 'Series 3, 38mm, GPS')
|
201
|
+
when 'Watch3,4'
|
202
|
+
Model.new(device_type, 'Apple Watch', 'Series 3, 42mm, GPS')
|
203
|
+
when 'Watch4,1'
|
204
|
+
Model.new(device_type, 'Apple Watch', 'Series 4, 40mm, GPS')
|
205
|
+
when 'Watch4,2'
|
206
|
+
Model.new(device_type, 'Apple Watch', 'Series 4, 44mm, GPS')
|
207
|
+
when 'Watch4,3'
|
208
|
+
Model.new(device_type, 'Apple Watch', 'Series 4, 40mm, GPS+Cellular')
|
209
|
+
when 'Watch4,4'
|
210
|
+
Model.new(device_type, 'Apple Watch', 'Series 4, 44mm, GPS+Cellular')
|
211
|
+
when 'Watch5,1'
|
212
|
+
Model.new(device_type, 'Apple Watch', 'Series 5, 40mm, GPS')
|
213
|
+
when 'Watch5,2'
|
214
|
+
Model.new(device_type, 'Apple Watch', 'Series 5, 44mm, GPS')
|
215
|
+
when 'Watch5,3'
|
216
|
+
Model.new(device_type, 'Apple Watch', 'Series 5, 40mm, GPS+Cellular')
|
217
|
+
when 'Watch5,4'
|
218
|
+
Model.new(device_type, 'Apple Watch', 'Series 5, 44mm, GPS+Cellular')
|
183
219
|
else
|
184
220
|
Model.new(device_type, 'Unknown iOS device')
|
185
221
|
end
|
data/lib/ios/devices/version.rb
CHANGED
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
|
|
@@ -22,5 +24,12 @@ describe Ios::Devices do
|
|
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.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ricardo Otero
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.1.2
|
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.1.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|