ios-devices 0.2.6 → 0.2.11

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
- SHA1:
3
- metadata.gz: 14cab4f32b372c2476f5025e805385caa89c35ce
4
- data.tar.gz: b967dfd636799e8c7a6552129f3f6d4e1dc6edf2
2
+ SHA256:
3
+ metadata.gz: 7b9201f839cd6293997793c10432240e311965dbaa6b5777575b481ca7ef9e7a
4
+ data.tar.gz: 01e5fd22e7b7e84a74fe2fa16d024b8629c886faae07b378162cb5b722339129
5
5
  SHA512:
6
- metadata.gz: 60b10f7544fdc19bb992186087c8a82b37b752be92802f1f84308dda41953aea1d742938b6f520d86a6b3b6ab62717f60deba3be9eea1cb65b16182621746068
7
- data.tar.gz: cfc1d5624c92bd5d00050b0637d260077415840c04d864646c47447ea87e96f9e207691123773d8194e406b1bcf3df7b80b0f0efc608062a2feffcc7750a1b07
6
+ metadata.gz: 0412322bf61a8ba11eb00c9dc5a5e463763e3f7c6237bff1acc493effe9b14bbfdf0c82bd026aa8feaa1ea09f2023180f0f1dc981d6cd1cab75459d47ea5d257
7
+ data.tar.gz: 1c2cf90ec2c5b508399b297b2ca50b059b5aee6b8f2c447f18a4c802d27340a9c156feccffa1249bdcd13b93ebb3797d8f7d31dc46962b07889bc4da9d319a7f
@@ -1 +1 @@
1
- 2.4.1
1
+ 2.5.8
@@ -1,9 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
+ - 2.6.5
4
+ - 2.5.8
3
5
  - 2.4.1
4
6
  - 2.3.0
5
- - 2.2.3
6
- - 2.1.0
7
- - 1.9.3
8
7
  script: bundle exec rspec
9
- before_install: gem install bundler -v 1.10.6
8
+ before_install: gem install bundler -v 2.1.2
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Build Status](https://travis-ci.org/rikas/iosdevices.svg)](https://travis-ci.org/rikas/iosdevices)
1
+ [![Gem Version](https://badge.fury.io/rb/ios-devices.svg)](https://badge.fury.io/rb/ios-devices) [![Build Status](https://travis-ci.org/rikas/iosdevices.svg?branch=master)](https://travis-ci.org/rikas/iosdevices)
2
2
 
3
3
  # Ios::Devices
4
4
 
@@ -30,23 +30,23 @@ connection, revision model, etc.
30
30
  ```ruby
31
31
  device = Ios::Devices.search('iPhone6,1')
32
32
  => #<Ios::Devices::Model:0x007fa55ba1a948 @extra=nil, @name="iPhone 5s", @device_type="iPhone6,1">
33
-
33
+
34
34
  device.name
35
35
  => "iPhone 5s"
36
36
 
37
37
  device = Ios::Devices.search('iPad2,2')
38
38
  => #<Ios::Devices::Model:0x007fa55b957308 @extra="GSM", @name="iPad 2", @device_type="iPad2,2">
39
-
39
+
40
40
  device.name
41
41
  => "iPad 2"
42
-
42
+
43
43
  device.extra
44
44
  => "GSM"
45
45
  ```
46
46
 
47
47
  ## Contributing
48
48
 
49
- 1. Fork it ( https://github.com/rikas/iosdevices/fork )
49
+ 1. Fork it (https://github.com/rikas/iosdevices/fork)
50
50
  2. Create your feature branch (`git checkout -b my-new-feature`)
51
51
  3. Commit your changes (`git commit -am 'Add some feature'`)
52
52
  4. Push to the branch (`git push origin my-new-feature`)
@@ -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', '~> 1.6'
26
- spec.add_development_dependency 'rake', '~> 10.0'
25
+ spec.add_development_dependency 'bundler', '~> 2.1.2'
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
@@ -58,6 +58,28 @@ module Ios
58
58
  Model.new(device_type, 'iPhone 8 Plus')
59
59
  when 'iPhone10,3', 'iPhone10,6'
60
60
  Model.new(device_type, 'iPhone X')
61
+ when 'iPhone11,2'
62
+ Model.new(device_type, 'iPhone XS')
63
+ when 'iPhone11,6'
64
+ Model.new(device_type, 'iPhone XS Max')
65
+ when 'iPhone11,8'
66
+ Model.new(device_type, 'iPhone XR')
67
+ when 'iPhone12,1'
68
+ Model.new(device_type, 'iPhone 11')
69
+ when 'iPhone12,3'
70
+ Model.new(device_type, 'iPhone 11 Pro')
71
+ when 'iPhone12,5'
72
+ Model.new(device_type, 'iPhone 11 Pro Max')
73
+ when 'iPhone12,8'
74
+ Model.new(device_type, 'iPhone SE', '2nd gen')
75
+ when 'iPhone13,1'
76
+ Model.new(device_type, 'iPhone 12 Mini')
77
+ when 'iPhone13,2'
78
+ Model.new(device_type, 'iPhone 12')
79
+ when 'iPhone13,3'
80
+ Model.new(device_type, 'iPhone 12 Pro')
81
+ when 'iPhone13,4'
82
+ Model.new(device_type, 'iPhone 12 Pro Max')
61
83
  when 'iPad1,1'
62
84
  Model.new(device_type, 'iPad')
63
85
  when 'iPad2,1'
@@ -126,6 +148,34 @@ module Ios
126
148
  Model.new(device_type, 'iPad Pro 10.5"', 'Wi-Fi')
127
149
  when 'iPad7,4'
128
150
  Model.new(device_type, 'iPad Pro 10.5"', 'Wi-Fi+LTE')
151
+ when 'iPad7,5'
152
+ Model.new(device_type, 'iPad', '6rd gen, Wi-Fi')
153
+ when 'iPad7,6'
154
+ Model.new(device_type, 'iPad', '6rd gen, Wi-Fi+LTE')
155
+ when 'iPad8,1'
156
+ Model.new(device_type, 'iPad Pro 11"', 'Wi-Fi')
157
+ when 'iPad8,2'
158
+ Model.new(device_type, 'iPad Pro 11"', 'Wi-Fi')
159
+ when 'iPad8,3'
160
+ Model.new(device_type, 'iPad Pro 11"', 'Wi-Fi+LTE')
161
+ when 'iPad8,4'
162
+ Model.new(device_type, 'iPad Pro 11"', 'Wi-Fi+LTE')
163
+ when 'iPad8,5'
164
+ Model.new(device_type, 'iPad Pro 12.9"', '3nd gen, Wi-Fi')
165
+ when 'iPad8,6'
166
+ Model.new(device_type, 'iPad Pro 12.9"', '3nd gen, Wi-Fi')
167
+ when 'iPad8,7'
168
+ Model.new(device_type, 'iPad Pro 12.9"', '3nd gen, Wi-Fi+LTE')
169
+ when 'iPad8,8'
170
+ Model.new(device_type, 'iPad Pro 12.9"', '3nd gen, Wi-Fi+LTE')
171
+ when 'iPad11,1'
172
+ Model.new(device_type, 'iPad mini 5', 'Wi-Fi')
173
+ when 'iPad11,2'
174
+ Model.new(device_type, 'iPad mini 5', 'Wi-Fi+LTE')
175
+ when 'iPad11,3'
176
+ Model.new(device_type, 'iPad Air 3', 'Wi-Fi')
177
+ when 'iPad11,4'
178
+ Model.new(device_type, 'iPad Air 3', 'Wi-Fi+LTE')
129
179
  when 'iPod1,1'
130
180
  Model.new(device_type, 'iPod touch')
131
181
  when 'iPod2,1'
@@ -136,10 +186,46 @@ module Ios
136
186
  Model.new(device_type, 'iPod touch', '4th gen')
137
187
  when 'iPod5,1'
138
188
  Model.new(device_type, 'iPod touch', '5th gen')
139
- when 'iPod6,1'
140
- Model.new(device_type, 'iPod touch', '6th gen')
141
189
  when 'iPod7,1'
190
+ Model.new(device_type, 'iPod touch', '6th gen')
191
+ when 'iPod9,1'
142
192
  Model.new(device_type, 'iPod touch', '7th gen')
193
+ when 'Watch1,1'
194
+ Model.new(device_type, 'Apple Watch', '38mm')
195
+ when 'Watch1,2'
196
+ Model.new(device_type, 'Apple Watch', '42mm')
197
+ when 'Watch2,6'
198
+ Model.new(device_type, 'Apple Watch', 'Series 1, 38mm')
199
+ when 'Watch2,7'
200
+ Model.new(device_type, 'Apple Watch', 'Series 1, 42mm')
201
+ when 'Watch2,3'
202
+ Model.new(device_type, 'Apple Watch', 'Series 2, 38mm')
203
+ when 'Watch2,4'
204
+ Model.new(device_type, 'Apple Watch', 'Series 2, 42mm')
205
+ when 'Watch3,1'
206
+ Model.new(device_type, 'Apple Watch', 'Series 3, 38mm, GPS+Cellular')
207
+ when 'Watch3,2'
208
+ Model.new(device_type, 'Apple Watch', 'Series 3, 42mm, GPS+Cellular')
209
+ when 'Watch3,3'
210
+ Model.new(device_type, 'Apple Watch', 'Series 3, 38mm, GPS')
211
+ when 'Watch3,4'
212
+ Model.new(device_type, 'Apple Watch', 'Series 3, 42mm, GPS')
213
+ when 'Watch4,1'
214
+ Model.new(device_type, 'Apple Watch', 'Series 4, 40mm, GPS')
215
+ when 'Watch4,2'
216
+ Model.new(device_type, 'Apple Watch', 'Series 4, 44mm, GPS')
217
+ when 'Watch4,3'
218
+ Model.new(device_type, 'Apple Watch', 'Series 4, 40mm, GPS+Cellular')
219
+ when 'Watch4,4'
220
+ Model.new(device_type, 'Apple Watch', 'Series 4, 44mm, GPS+Cellular')
221
+ when 'Watch5,1'
222
+ Model.new(device_type, 'Apple Watch', 'Series 5, 40mm, GPS')
223
+ when 'Watch5,2'
224
+ Model.new(device_type, 'Apple Watch', 'Series 5, 44mm, GPS')
225
+ when 'Watch5,3'
226
+ Model.new(device_type, 'Apple Watch', 'Series 5, 40mm, GPS+Cellular')
227
+ when 'Watch5,4'
228
+ Model.new(device_type, 'Apple Watch', 'Series 5, 44mm, GPS+Cellular')
143
229
  else
144
230
  Model.new(device_type, 'Unknown iOS device')
145
231
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ios
4
4
  module Devices
5
- VERSION = '0.2.6'
5
+ VERSION = '0.2.11'
6
6
  end
7
7
  end
@@ -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.6
4
+ version: 0.2.11
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: 2018-02-09 00:00:00.000000000 Z
11
+ date: 2020-10-20 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: '1.6'
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: '1.6'
26
+ version: 2.1.2
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: '10.0'
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: '10.0'
40
+ version: 12.3.3
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: pry
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -77,7 +77,6 @@ extra_rdoc_files: []
77
77
  files:
78
78
  - ".gitignore"
79
79
  - ".rspec"
80
- - ".ruby-gemset"
81
80
  - ".ruby-version"
82
81
  - ".travis.yml"
83
82
  - Gemfile
@@ -94,7 +93,7 @@ homepage: http://github.com/rikas/iosdevices
94
93
  licenses:
95
94
  - MIT
96
95
  metadata: {}
97
- post_install_message:
96
+ post_install_message:
98
97
  rdoc_options: []
99
98
  require_paths:
100
99
  - lib
@@ -109,9 +108,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
108
  - !ruby/object:Gem::Version
110
109
  version: '0'
111
110
  requirements: []
112
- rubyforge_project:
113
- rubygems_version: 2.6.11
114
- signing_key:
111
+ rubyforge_project:
112
+ rubygems_version: 2.7.6.2
113
+ signing_key:
115
114
  specification_version: 4
116
115
  summary: iOS device model translation from Apple device types.
117
116
  test_files:
@@ -1 +0,0 @@
1
- ios-devices