ruaur 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ruaur/package.rb +16 -14
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f30ee3547cf8f289a463fb44b65c0301b61fa9cc1e03cebd305842c7c8fbdf8
|
4
|
+
data.tar.gz: cb7cd6303985596af02d528f82b4174286671b922d3bf650224c069c8340835c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 479c0e1c0fed696eef6dd3e52351fd365f26e561f0cf890b2f908cc856625c26b352e09a7d61e0da3ce5968d70ba6aa5ba512c4a17a3fce69c29621032c8d851
|
7
|
+
data.tar.gz: d8dcb6eab55ec4a9598af8e241532514825416f68b41e44dad729359d93a5d6d5ac313a52cf094a72d85f03fcec670ce206ff2d53e7cf138ae72c1f523804dd4
|
data/lib/ruaur/package.rb
CHANGED
@@ -79,25 +79,27 @@ class RuAUR::Package
|
|
79
79
|
end
|
80
80
|
|
81
81
|
def newer?(ver)
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
[
|
86
|
-
if (
|
87
|
-
|
88
|
-
|
82
|
+
pkg_version = @version.split(/\D+/).map(&:to_i)
|
83
|
+
installed_version = ver.split(/\D+/).map(&:to_i)
|
84
|
+
|
85
|
+
[pkg_version.size, installed_version.size].max.times do |i|
|
86
|
+
return false if (pkg_version[i].nil?)
|
87
|
+
return true if (installed_version[i].nil?)
|
88
|
+
return true if (pkg_version[i] > installed_version[i])
|
89
|
+
return false if (pkg_version[i] < installed_version[i])
|
89
90
|
end
|
90
91
|
return false
|
91
92
|
end
|
92
93
|
|
93
94
|
def older?(version)
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
[
|
98
|
-
if (
|
99
|
-
|
100
|
-
|
95
|
+
pkg_version = @version.split(/\D+/).map(&:to_i)
|
96
|
+
installed_version = version.split(/\D+/).map(&:to_i)
|
97
|
+
|
98
|
+
[pkg_version.size, installed_version.size].max.times do |i|
|
99
|
+
return true if (pkg_version[i].nil?)
|
100
|
+
return false if (installed_version[i].nil?)
|
101
|
+
return true if (pkg_version[i] < installed_version[i])
|
102
|
+
return false if (pkg_version[i] > installed_version[i])
|
101
103
|
end
|
102
104
|
return false
|
103
105
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruaur
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Whittaker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|