fourflusher 2.0.0 → 2.0.1

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
2
  SHA1:
3
- metadata.gz: 51d11f36e15ae2cef0aec386296a4ff9888ece0e
4
- data.tar.gz: a363748b2fd402115f6ca433f802f22160ead987
3
+ metadata.gz: a15cd63436402589cb162cd8eb4cbd0898ef4136
4
+ data.tar.gz: 44a25b54b1e218b74da70b1af84f782a675aa058
5
5
  SHA512:
6
- metadata.gz: eea706a0d6b0bb7bb538557a729b398714e4b45c354168ff2544f3e5fd0d8aad46b33bd6e21812bedb3838b9c6261b370c844baa5cc0a35c23e836d3f4773d12
7
- data.tar.gz: e327d66420dcf7c0178bcf7a52ad8cdda85ae06599980b78c3be2e8a4eee97f5c414cb4492efb89753d43ea8f0e7701f3213697b61775c1292455a2b4bb42193
6
+ metadata.gz: 90178b576cc13925b46cae5e0501c4ca064d61046811110e79e253254e4befc96ab3c3b5fe5a12ee401a3645d264e38eb88baabcbc9c93ef1b631829decb0cc1
7
+ data.tar.gz: 6a759a86c2a5b2cc251ad1ee473f75af9f4308c25a94b5c3c15a8ae35aaf5f55096ee18e2b83696ff808ff7a31a2370174594a7f41d473f3af5e44c6f51b57ee
@@ -1,13 +1,16 @@
1
1
 
2
- ## 2.0.0 (2016-10-02)
2
+ ## 2.0.1 (2016-10-16)
3
3
 
4
4
  ##### Enhancements
5
5
 
6
- * None
6
+ * None.
7
7
 
8
8
  ##### Bug Fixes
9
9
 
10
- * None
10
+ * Fixed crash with simulators comparison, when device model is undefined
11
+ [Roman Truba](https://github.com/dreddik)
12
+ [#9](https://github.com/CocoaPods/fourflusher/pull/9)
13
+
11
14
 
12
15
  ## v2.0.0 (2016-10-02)
13
16
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fourflusher (2.0.0)
4
+ fourflusher (2.0.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -31,12 +31,16 @@ module Fourflusher
31
31
  return other.os_version <=> os_version unless os_version == other.os_version
32
32
  device1, model1 = device_and_model
33
33
  device2, model2 = other.device_and_model
34
- unless device1 == device2
35
- return -1 if device1 == 'iPhone'
36
- return 1 if device2 == 'iPhone'
37
- return device1 <=> device2
38
- end
39
- model1 <=> model2
34
+ return device_compare(device1, device2) unless device1 == device2
35
+ return model1 <=> model2 unless model1.nil? || model2.nil?
36
+ model2.nil? ? 1 : -1
37
+ end
38
+
39
+ def device_compare(my_device, other_device)
40
+ return -1 if my_device == 'iPhone'
41
+ return 1 if other_device == 'iPhone'
42
+ return my_device <=> other_device unless my_device.nil? || other_device.nil?
43
+ other_device.nil? ? 1 : -1
40
44
  end
41
45
 
42
46
  # Returns the [device, model] for use during sorting
@@ -1,3 +1,3 @@
1
1
  module Fourflusher
2
- VERSION = '2.0.0'
2
+ VERSION = '2.0.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fourflusher
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boris Bügling
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-02 00:00:00.000000000 Z
11
+ date: 2016-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler