Icarus-Mod-Tools 1.7.0 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/icarus/mod/tools/modinfo.rb +6 -2
- data/lib/icarus/mod/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd3e0ae69c6ef23c28a6f91e0ea2bef191fb23cb497624c4a6861542f0d55529
|
4
|
+
data.tar.gz: 74f1b174266c581ab857fd8079bc08345e055c12de0df175a24b84d5cf943c0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e2065dcd3968f5e692db72955f6c898e16c442c47cca55681586fb6c9b07c1ba7ed19c48b402b73b02004f70fb6c25def55d4f9daa4a46b1316ec5a2489e019
|
7
|
+
data.tar.gz: e56b480e1bd28fe040e0cd7a561f848596a654bb492457c92244902dbc046fe8a5ce8634f49455322ef03587c2762dc4003eb38e2b9c1fea5a7681562572a700
|
data/Gemfile.lock
CHANGED
@@ -53,13 +53,13 @@ module Icarus
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def validate
|
56
|
-
@warnings << "Version should
|
56
|
+
@warnings << "Version should be a version string" unless validate_version(version)
|
57
57
|
|
58
58
|
%w[name author description].each do |key|
|
59
59
|
@errors << "#{key.capitalize} cannot be blank" unless validate_string(@data[key.to_sym])
|
60
60
|
end
|
61
61
|
|
62
|
-
@errors << "Invalid
|
62
|
+
@errors << "Invalid fileType: #{fileType || "blank"}" unless validate_filetype(fileType)
|
63
63
|
|
64
64
|
%w[fileURL imageURL readmeURL].each do |key|
|
65
65
|
@errors << "Invalid URL #{key.capitalize}: #{@data[key.to_sym] || "blank"}" unless validate_url(@data[key.to_sym])
|
@@ -91,6 +91,10 @@ module Icarus
|
|
91
91
|
def validate_string(string)
|
92
92
|
!(string.nil? || string.empty?)
|
93
93
|
end
|
94
|
+
|
95
|
+
def validate_version(version)
|
96
|
+
version =~ /\d+\.\d+[.\d+]?/
|
97
|
+
end
|
94
98
|
end
|
95
99
|
end
|
96
100
|
end
|
data/lib/icarus/mod/version.rb
CHANGED