arduino-library 0.5.1 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/arduino/library/model.rb +10 -3
- data/lib/arduino/library/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6691a2146d6bc9c2ab4a239df35cbe6c84bf7292
|
4
|
+
data.tar.gz: e84d26718c57e606b13957df6b7af818a24a8c6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64e2c1775881a54e41f4ab4a8df24e1586c5d104e252cd28464f11596746bca3daffe79b5b466174e3b88d1fbc274f5ae2768ba3499ca2aa5e5b75e8b8779ef1
|
7
|
+
data.tar.gz: c64b0539981bc60d343de65db3d479da4815c8443ee532821d67f3c30b966d71722d5e0e32c61e75c21d6faabded3bd6e7d3c221815e9062b8d3063550876d42
|
@@ -41,7 +41,11 @@ module Arduino
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def <=>(another)
|
44
|
-
self.
|
44
|
+
if self.name == another.name
|
45
|
+
self.version_to_i <=> another.version_to_i
|
46
|
+
else
|
47
|
+
self.name <=> another.name
|
48
|
+
end
|
45
49
|
end
|
46
50
|
|
47
51
|
# Class Methods
|
@@ -124,8 +128,11 @@ module Arduino
|
|
124
128
|
if opts
|
125
129
|
if SEARCHABLE_FIELDS.any?{ |field| opts[field] }
|
126
130
|
results = search(**opts)
|
127
|
-
|
128
|
-
|
131
|
+
if results
|
132
|
+
results.sort.last
|
133
|
+
else
|
134
|
+
nil
|
135
|
+
end
|
129
136
|
else
|
130
137
|
from_hash(opts)
|
131
138
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Arduino
|
2
2
|
module Library
|
3
|
-
VERSION = '0.5.
|
3
|
+
VERSION = '0.5.3'
|
4
4
|
DESCRIPTION = <<-eof
|
5
5
|
This library provides a convenient ruby API for representation of an Arduino Library specification, including field and type validation, reading and writing the library.properties file, as well as downloading the official database of Arduino libraries, and offering a highly advanced searching functionality. This gem only offers Ruby API, but for command line usage please checkout the gem called "arli" — Arduino Library Dependency Manager that uses this library behind the scenes.
|
6
6
|
eof
|