Icarus-Mod-Tools 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -6
- data/Gemfile.lock +1 -1
- data/lib/icarus/mod/tools/baseinfo.rb +3 -5
- data/lib/icarus/mod/tools/modinfo.rb +4 -10
- data/lib/icarus/mod/tools/toolinfo.rb +9 -0
- 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: 6b11076691550f236dbbe8cffc43ab3f4e87d0d6bc3796a05249586884df9af7
|
4
|
+
data.tar.gz: 7c0c0dbeee725796ebea01ea3b8f0d1fd11418fc92aaad54ceca055ef36c83f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb68f166b13d2d62e696d880a7ce63da51a0d941fd00211a6c63df28109808ee85f390090dcbf0c5bad35f5905b79d05b902a4be72b3366cc31a96ee908cc9d7
|
7
|
+
data.tar.gz: 55e3a9b353561d231cc58f6081f06f98d0204b9229d1fe1f404b0516e2dbd8e37a82297bb0bd610a3e11afc6f5409020409f9d3aec524d26c44b90b3790abfc7
|
data/CHANGELOG.md
CHANGED
@@ -4,13 +4,10 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
|
5
5
|
## History (reverse chronological order)
|
6
6
|
|
7
|
-
|
7
|
+
### v2.1 - 2023-02-11
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
* Create fileType and fileURL along with files ([a5294a4](https://github.com/DonovanMods/icarus-mod-tools/commit/a5294a479bcc68f6e4125f5062db9a0dbd48bdf8))
|
13
|
-
* Create fileType and fileURL along with files ([db5620f](https://github.com/DonovanMods/icarus-mod-tools/commit/db5620fafefd750196d6470f00e4000971adae1f))
|
9
|
+
- Remove support for `fileType` and `fileURL` in `modinfo.json` files
|
10
|
+
- bugfixes
|
14
11
|
|
15
12
|
### v2.0 - 2023-02-03
|
16
13
|
|
data/Gemfile.lock
CHANGED
@@ -75,14 +75,12 @@ module Icarus
|
|
75
75
|
return true if @validated
|
76
76
|
|
77
77
|
validate_version
|
78
|
-
validate_files if @data.key?(:files)
|
79
|
-
validate_filetype(fileType) if @data.key?(:fileType)
|
80
78
|
|
81
79
|
%w[name author description].each do |key|
|
82
80
|
@errors << "#{key.capitalize} cannot be blank" unless validate_string(@data[key.to_sym])
|
83
81
|
end
|
84
82
|
|
85
|
-
%w[
|
83
|
+
%w[imageURL readmeURL].each do |key|
|
86
84
|
@errors << "Invalid URL #{key.capitalize}: #{@data[key.to_sym] || "blank"}" unless validate_url(@data[key.to_sym])
|
87
85
|
end
|
88
86
|
|
@@ -128,8 +126,8 @@ module Icarus
|
|
128
126
|
end
|
129
127
|
|
130
128
|
def validate_files
|
131
|
-
@
|
132
|
-
@
|
129
|
+
@warnings << "This mod uses deprecated fields (fileType and fileURL)" if @data.key?(:fileType) || @data.key?(:fileURL)
|
130
|
+
@warnings << "files should not be empty" if file_types.empty?
|
133
131
|
|
134
132
|
file_types.each { |file_type| validate_filetype(file_type) }
|
135
133
|
|
@@ -14,19 +14,13 @@ module Icarus
|
|
14
14
|
db_hash
|
15
15
|
end
|
16
16
|
|
17
|
-
def
|
18
|
-
|
19
|
-
end
|
17
|
+
def validate
|
18
|
+
return true if @validated
|
20
19
|
|
21
|
-
|
22
|
-
files&.values || [@data[:fileURL]].compact
|
23
|
-
end
|
20
|
+
validate_files
|
24
21
|
|
25
|
-
|
26
|
-
def fileType
|
27
|
-
@data[:fileType] || "pak"
|
22
|
+
super
|
28
23
|
end
|
29
|
-
# rubocop:enable Naming/MethodName
|
30
24
|
end
|
31
25
|
end
|
32
26
|
end
|
@@ -24,6 +24,15 @@ module Icarus
|
|
24
24
|
def filetype_pattern
|
25
25
|
/(zip|exe)/i
|
26
26
|
end
|
27
|
+
|
28
|
+
def validate
|
29
|
+
return true if @validated
|
30
|
+
|
31
|
+
validate_filetype(fileType)
|
32
|
+
@errors << "Invalid fileURL: #{@data[:fileURL] || "blank"}" unless validate_url(fileURL)
|
33
|
+
|
34
|
+
super
|
35
|
+
end
|
27
36
|
end
|
28
37
|
end
|
29
38
|
end
|
data/lib/icarus/mod/version.rb
CHANGED