Icarus-Mod-Tools 2.1.0 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -6
- data/Gemfile.lock +1 -5
- 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 +13 -0
- data/lib/icarus/mod/version.rb +1 -1
- 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: 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
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
Icarus-Mod-Tools (2.1.
|
4
|
+
Icarus-Mod-Tools (2.1.2)
|
5
5
|
google-cloud-firestore (~> 2.7)
|
6
6
|
octokit (~> 6.0)
|
7
7
|
paint (~> 2.3)
|
@@ -51,7 +51,6 @@ GEM
|
|
51
51
|
gapic-common (>= 0.16.0, < 2.a)
|
52
52
|
google-cloud-errors (~> 1.0)
|
53
53
|
google-protobuf (3.21.12-x86_64-darwin)
|
54
|
-
google-protobuf (3.21.12-x86_64-linux)
|
55
54
|
googleapis-common-protos (1.4.0)
|
56
55
|
google-protobuf (~> 3.14)
|
57
56
|
googleapis-common-protos-types (~> 1.2)
|
@@ -68,9 +67,6 @@ GEM
|
|
68
67
|
grpc (1.52.0-x86_64-darwin)
|
69
68
|
google-protobuf (~> 3.21)
|
70
69
|
googleapis-common-protos-types (~> 1.0)
|
71
|
-
grpc (1.52.0-x86_64-linux)
|
72
|
-
google-protobuf (~> 3.21)
|
73
|
-
googleapis-common-protos-types (~> 1.0)
|
74
70
|
guard (2.18.0)
|
75
71
|
formatador (>= 0.2.4)
|
76
72
|
listen (>= 2.7, < 4.0)
|
@@ -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
|
@@ -15,11 +15,24 @@ module Icarus
|
|
15
15
|
end
|
16
16
|
# rubocop:enable Naming/MethodName
|
17
17
|
|
18
|
+
def to_h
|
19
|
+
HASHKEYS.each_with_object({}) { |key, hash| hash[key] = @data[key] }
|
20
|
+
end
|
21
|
+
|
18
22
|
private
|
19
23
|
|
20
24
|
def filetype_pattern
|
21
25
|
/(zip|exe)/i
|
22
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
|
23
36
|
end
|
24
37
|
end
|
25
38
|
end
|
data/lib/icarus/mod/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Icarus-Mod-Tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Donovan Young
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-cloud-firestore
|