apple_db 0.1.1 → 0.1.2

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
  SHA256:
3
- metadata.gz: 5d1292a7dc10df60f8b7499fe5649a50b8bbebc15ad73e253b3b1d43437762ff
4
- data.tar.gz: a759e2dd4770d0ff1e046ea1dc69362003aba1992feb216bb68fb13651a9a914
3
+ metadata.gz: 44b5798ff34f2c147e45892a8b4d79e1137fd8553c55f53e705b5f06247ae992
4
+ data.tar.gz: 9678de7c0f18992d92ddc1d22dafa6333abd366321c8f1450746580d28c9e3d2
5
5
  SHA512:
6
- metadata.gz: 451be0dc95b58e8bd032982a24d3db80e988acb91775ede54c5d246c4d649f8da7819a1e8567ac8689e4095555bff4f787f3ddb5b888098fb497fdca46c6da10
7
- data.tar.gz: 1640d13373ef2c82a16ac3bacf4611c46b407ff79cf6c049c89dffabd2a5e6e430409d6b5e3ee3f8f6997fee250aaa395eb52290c72c80f5dcd2b88682851d6b
6
+ metadata.gz: dec4a88c84d2f120d2bcad8f7317a7a533f23b497959268cd6f7a6043cdabc599bb499df815895e834d5d06bb96b11f7db37ff2a58fedb97b2e832452f53e4ad
7
+ data.tar.gz: 37f8f3adf17d35522ebf5e76cf8d4a03ec5362da2e8d6fe0f6dbf0fda386692ae1be80af6c8b2f7cd90416ee9906205fdaebbcef5ba8af8dbe40fc9e647193d9
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.2
4
+
5
+ Allow searching for older 11-digit serial numbers
6
+
3
7
  ## 0.1.1
4
8
 
5
9
  Add devices from https://github.com/acidanthera/MacInfoPkg
@@ -4,8 +4,9 @@ require "apple_db/version"
4
4
  module AppleDb
5
5
  class Identifier
6
6
  def find_by_serial_number(serial_number)
7
- last_4 = serial_number[serial_number.length - 4, serial_number.length]
8
- items.find { |item| last_4 == item["identifier"] }
7
+ identifier = serial_number[serial_number.length - 4, serial_number.length]
8
+ identifier[0] = "" if serial_number.length == 11
9
+ items.find { |item| identifier == item["identifier"] }
9
10
  end
10
11
 
11
12
  private
@@ -7625,6 +7625,7 @@ N6VR|Stationary|Mac mini (2018)
7625
7625
  N6W|Router|AirPort Extreme Card
7626
7626
  N6X|Router|AirPort Extreme Card
7627
7627
  N6Y|Router|AirPort Extreme Card
7628
+ N6YF|Phone|iPhone 11 Pro
7628
7629
  N71C|Laptop|MacBook Pro (13-inch, 2019, Two Thunderbolt 3 ports)
7629
7630
  N71D|Laptop|MacBook Pro (13-inch, 2019, Two Thunderbolt 3 ports)
7630
7631
  N71F|Laptop|MacBook Pro (13-inch, 2019, Two Thunderbolt 3 ports)
@@ -1,3 +1,3 @@
1
1
  module AppleDb
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apple_db
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johan Halse