ehbrs_ruby_utils 0.36.1 → 0.38.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ehbrs_ruby_utils/executables.rb +10 -1
- data/lib/ehbrs_ruby_utils/fs/compressed_package.rb +5 -4
- data/lib/ehbrs_ruby_utils/fs/iso_9660_file.rb +32 -0
- data/lib/ehbrs_ruby_utils/version.rb +1 -1
- data/lib/ehbrs_ruby_utils/vg/ps2/iso_file.rb +45 -0
- data/lib/ehbrs_ruby_utils/vg/ps2.rb +11 -0
- data/lib/ehbrs_ruby_utils/vg/wii/file_move.rb +3 -3
- data/lib/ehbrs_ruby_utils/vg/wii/game_file.rb +2 -1
- data/lib/ehbrs_ruby_utils/vg/wii/wit/image_format.rb +2 -2
- data/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/info.rb +0 -2
- metadata +33 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 375d67ec113f9773d1c7f89211884746357a5a56078b21d4f3dd0780385f87ac
|
4
|
+
data.tar.gz: fc600162f063b6c2bcd529876687422d62abcb2b663f0903f234b1724c7147a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e5e2d657e5fec5a8938a70cb69616572dea93bfbce5b855f5e34f8b2d9d621a6cf0de651cec2420873fd437997e0ee146d67bcbffbcaf0f35df6174cb51c66b
|
7
|
+
data.tar.gz: c23ae3131b15e9f96d8b59072950b916e36e52b4cfdf60c32498becc377d666acaefcd7e6a82f91c693bdb33bf689a3248f78af0057c2482b87bc085449ed550
|
@@ -15,7 +15,10 @@ module EhbrsRubyUtils
|
|
15
15
|
private
|
16
16
|
|
17
17
|
{
|
18
|
-
'
|
18
|
+
'-?' => %w[rar],
|
19
|
+
'-h' => %w[unzip],
|
20
|
+
'-version' => %w[ffmpeg ffprobe],
|
21
|
+
'--version' => %w[isoinfo tar wit]
|
19
22
|
}.each do |validate_arg, commands|
|
20
23
|
commands.each do |command|
|
21
24
|
define_method("#{command}_uncached") do
|
@@ -28,6 +31,12 @@ module EhbrsRubyUtils
|
|
28
31
|
def mudslide_uncached
|
29
32
|
env.executable('mudslide', exec_args: %w[npx mudslide@latest], check_args: %w[--version])
|
30
33
|
end
|
34
|
+
|
35
|
+
# !method sevenzip
|
36
|
+
# @return [EacRubyUtils::Envs::Executable]
|
37
|
+
def sevenzip_uncached
|
38
|
+
env.executable('7z', '--help')
|
39
|
+
end
|
31
40
|
end
|
32
41
|
end
|
33
42
|
end
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'eac_fs/file_info'
|
4
4
|
require 'eac_ruby_utils/core_ext'
|
5
|
+
require 'ehbrs_ruby_utils/executables'
|
5
6
|
|
6
7
|
module EhbrsRubyUtils
|
7
8
|
module Fs
|
@@ -29,19 +30,19 @@ module EhbrsRubyUtils
|
|
29
30
|
end
|
30
31
|
|
31
32
|
def sevenzip_extract_command(target_dir)
|
32
|
-
::
|
33
|
+
::EhbrsRubyUtils::Executables.sevenzip.command('x', path, '-o', target_dir)
|
33
34
|
end
|
34
35
|
|
35
36
|
def tar_extract_command(target_dir)
|
36
|
-
::
|
37
|
+
::EhbrsRubyUtils::Executables.tar.command('-xf', path, '-C', target_dir)
|
37
38
|
end
|
38
39
|
|
39
40
|
def rar_extract_command(target_dir)
|
40
|
-
::
|
41
|
+
::EhbrsRubyUtils::Executables.rar.command('x', path.expand_path).chdir(target_dir)
|
41
42
|
end
|
42
43
|
|
43
44
|
def zip_extract_command(target_dir)
|
44
|
-
::
|
45
|
+
::EhbrsRubyUtils::Executables.unzip.command(path, '-d', target_dir)
|
45
46
|
end
|
46
47
|
end
|
47
48
|
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
require 'ehbrs_ruby_utils/executables'
|
5
|
+
|
6
|
+
module EhbrsRubyUtils
|
7
|
+
module Fs
|
8
|
+
class Iso9660File
|
9
|
+
DEFAULT_EXTNAME = '.iso'
|
10
|
+
|
11
|
+
common_constructor :path do
|
12
|
+
self.path = path.to_pathname
|
13
|
+
end
|
14
|
+
|
15
|
+
# @return [Array<String>]
|
16
|
+
def list
|
17
|
+
isoinfo_command('-f').execute!.each_line
|
18
|
+
end
|
19
|
+
|
20
|
+
# @param command_args [Array<String>]
|
21
|
+
# @return [EacRubyUtils::Envs::Command]
|
22
|
+
def isoinfo_command(*command_args)
|
23
|
+
::EacRubyUtils::Envs.local.command('isoinfo', '-i', path, *command_args)
|
24
|
+
end
|
25
|
+
|
26
|
+
# @return [Boolean]
|
27
|
+
def valid?
|
28
|
+
isoinfo_command.execute.fetch(:exit_code).zero?
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
require 'ehbrs_ruby_utils/fs/iso_9660_file'
|
5
|
+
|
6
|
+
module EhbrsRubyUtils
|
7
|
+
module Vg
|
8
|
+
module Ps2
|
9
|
+
class IsoFile < ::EhbrsRubyUtils::Fs::Iso9660File
|
10
|
+
CODE_PATTERN = /[a-zA-Z]{4}_[0-9]{3}\.[0-9]{2}/.freeze
|
11
|
+
CODE_PARSER = CODE_PATTERN.to_parser(&:to_s)
|
12
|
+
|
13
|
+
# @return [String]
|
14
|
+
def code
|
15
|
+
list.lazy.map { |line| CODE_PARSER.parse(line) }.find(&:present?)
|
16
|
+
end
|
17
|
+
|
18
|
+
# @return [String]
|
19
|
+
def basename_nocode_noext
|
20
|
+
path.basename_noext.to_path.gsub(/\A#{::Regexp.quote(code)}/, '')
|
21
|
+
end
|
22
|
+
|
23
|
+
# @return [Path]
|
24
|
+
def target_path
|
25
|
+
path.basename_sub do |_b|
|
26
|
+
"#{code}.#{path_basename}#{DEFAULT_EXTNAME}"
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
# @return [Boolean]
|
31
|
+
def valid?
|
32
|
+
super && code.present?
|
33
|
+
end
|
34
|
+
|
35
|
+
private
|
36
|
+
|
37
|
+
# @return [String]
|
38
|
+
def path_basename
|
39
|
+
path.basename_noext.to_path.gsub(/\A#{::Regexp.quote(code)}/, '')
|
40
|
+
.gsub(/[^0-9a-zA-Z]+/, '_').gsub(/\A_+/, '').gsub(/_+\z/, '')
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'eac_ruby_utils/core_ext'
|
4
|
-
require '
|
4
|
+
require 'ehbrs_ruby_utils/executables'
|
5
5
|
require 'ehbrs_ruby_utils/vg/wii/wit/image_format'
|
6
6
|
require 'ehbrs_ruby_utils/vg/wii/wit/path'
|
7
7
|
require 'fileutils'
|
@@ -47,7 +47,7 @@ module EhbrsRubyUtils
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def change_path_and_type
|
50
|
-
::
|
50
|
+
::EhbrsRubyUtils::Executables.wit.command
|
51
51
|
.append(change_path_and_type_args)
|
52
52
|
.system!
|
53
53
|
check_target
|
@@ -61,7 +61,7 @@ module EhbrsRubyUtils
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def change_type
|
64
|
-
::
|
64
|
+
::EhbrsRubyUtils::Executables.wit.command
|
65
65
|
.append(change_type_args)
|
66
66
|
.system!
|
67
67
|
end
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'eac_ruby_utils/core_ext'
|
4
4
|
require 'eac_ruby_utils/custom_format'
|
5
|
+
require 'ehbrs_ruby_utils/executables'
|
5
6
|
require 'ehbrs_ruby_utils/vg/wii/wit/parsers/dump'
|
6
7
|
require 'ehbrs_ruby_utils/vg/wii/wit/path'
|
7
8
|
require 'pathname'
|
@@ -76,7 +77,7 @@ module EhbrsRubyUtils
|
|
76
77
|
private
|
77
78
|
|
78
79
|
def properties_uncached
|
79
|
-
r = ::
|
80
|
+
r = ::EhbrsRubyUtils::Executables.wit.command.append(['dump', to_s]).execute
|
80
81
|
return nil unless r.fetch(:exit_code).zero?
|
81
82
|
|
82
83
|
::EhbrsRubyUtils::Vg::Wii::Wit::Parsers::Dump.new(r.fetch(:stdout)).properties
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'eac_ruby_utils/core_ext'
|
4
|
-
require '
|
4
|
+
require 'ehbrs_ruby_utils/executables'
|
5
5
|
require 'ehbrs_ruby_utils/vg/wii/wit/parsers/info'
|
6
6
|
|
7
7
|
module EhbrsRubyUtils
|
@@ -33,7 +33,7 @@ module EhbrsRubyUtils
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def info_output
|
36
|
-
::
|
36
|
+
::EhbrsRubyUtils::Executables.wit.command
|
37
37
|
.append(%w[info image-format --sections])
|
38
38
|
.execute!
|
39
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ehbrs_ruby_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.38.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eduardo H. Bogoni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha
|
@@ -36,14 +36,14 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '0.
|
39
|
+
version: '0.22'
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '0.
|
46
|
+
version: '0.22'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: aranha-selenium
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -64,14 +64,20 @@ dependencies:
|
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '0.
|
67
|
+
version: '0.84'
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: 0.84.2
|
68
71
|
type: :runtime
|
69
72
|
prerelease: false
|
70
73
|
version_requirements: !ruby/object:Gem::Requirement
|
71
74
|
requirements:
|
72
75
|
- - "~>"
|
73
76
|
- !ruby/object:Gem::Version
|
74
|
-
version: '0.
|
77
|
+
version: '0.84'
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: 0.84.2
|
75
81
|
- !ruby/object:Gem::Dependency
|
76
82
|
name: dentaku
|
77
83
|
requirement: !ruby/object:Gem::Requirement
|
@@ -126,20 +132,14 @@ dependencies:
|
|
126
132
|
requirements:
|
127
133
|
- - "~>"
|
128
134
|
- !ruby/object:Gem::Version
|
129
|
-
version: '0.
|
130
|
-
- - ">="
|
131
|
-
- !ruby/object:Gem::Version
|
132
|
-
version: 0.119.2
|
135
|
+
version: '0.120'
|
133
136
|
type: :runtime
|
134
137
|
prerelease: false
|
135
138
|
version_requirements: !ruby/object:Gem::Requirement
|
136
139
|
requirements:
|
137
140
|
- - "~>"
|
138
141
|
- !ruby/object:Gem::Version
|
139
|
-
version: '0.
|
140
|
-
- - ">="
|
141
|
-
- !ruby/object:Gem::Version
|
142
|
-
version: 0.119.2
|
142
|
+
version: '0.120'
|
143
143
|
- !ruby/object:Gem::Dependency
|
144
144
|
name: eac_templates
|
145
145
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,6 +154,20 @@ dependencies:
|
|
154
154
|
- - "~>"
|
155
155
|
- !ruby/object:Gem::Version
|
156
156
|
version: '0.5'
|
157
|
+
- !ruby/object:Gem::Dependency
|
158
|
+
name: inifile
|
159
|
+
requirement: !ruby/object:Gem::Requirement
|
160
|
+
requirements:
|
161
|
+
- - "~>"
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: '3.0'
|
164
|
+
type: :runtime
|
165
|
+
prerelease: false
|
166
|
+
version_requirements: !ruby/object:Gem::Requirement
|
167
|
+
requirements:
|
168
|
+
- - "~>"
|
169
|
+
- !ruby/object:Gem::Version
|
170
|
+
version: '3.0'
|
157
171
|
- !ruby/object:Gem::Dependency
|
158
172
|
name: srt
|
159
173
|
requirement: !ruby/object:Gem::Requirement
|
@@ -214,40 +228,20 @@ dependencies:
|
|
214
228
|
- - ">="
|
215
229
|
- !ruby/object:Gem::Version
|
216
230
|
version: 0.1.3
|
217
|
-
- !ruby/object:Gem::Dependency
|
218
|
-
name: aranha-parsers
|
219
|
-
requirement: !ruby/object:Gem::Requirement
|
220
|
-
requirements:
|
221
|
-
- - "~>"
|
222
|
-
- !ruby/object:Gem::Version
|
223
|
-
version: '0.8'
|
224
|
-
type: :development
|
225
|
-
prerelease: false
|
226
|
-
version_requirements: !ruby/object:Gem::Requirement
|
227
|
-
requirements:
|
228
|
-
- - "~>"
|
229
|
-
- !ruby/object:Gem::Version
|
230
|
-
version: '0.8'
|
231
231
|
- !ruby/object:Gem::Dependency
|
232
232
|
name: eac_ruby_gem_support
|
233
233
|
requirement: !ruby/object:Gem::Requirement
|
234
234
|
requirements:
|
235
235
|
- - "~>"
|
236
236
|
- !ruby/object:Gem::Version
|
237
|
-
version: '0.
|
238
|
-
- - ">="
|
239
|
-
- !ruby/object:Gem::Version
|
240
|
-
version: 0.8.2
|
237
|
+
version: '0.9'
|
241
238
|
type: :development
|
242
239
|
prerelease: false
|
243
240
|
version_requirements: !ruby/object:Gem::Requirement
|
244
241
|
requirements:
|
245
242
|
- - "~>"
|
246
243
|
- !ruby/object:Gem::Version
|
247
|
-
version: '0.
|
248
|
-
- - ">="
|
249
|
-
- !ruby/object:Gem::Version
|
250
|
-
version: 0.8.2
|
244
|
+
version: '0.9'
|
251
245
|
description:
|
252
246
|
email:
|
253
247
|
executables: []
|
@@ -306,6 +300,7 @@ files:
|
|
306
300
|
- lib/ehbrs_ruby_utils/finances/bb_browser/docker_image.rb
|
307
301
|
- lib/ehbrs_ruby_utils/fs.rb
|
308
302
|
- lib/ehbrs_ruby_utils/fs/compressed_package.rb
|
303
|
+
- lib/ehbrs_ruby_utils/fs/iso_9660_file.rb
|
309
304
|
- lib/ehbrs_ruby_utils/fs/selected.rb
|
310
305
|
- lib/ehbrs_ruby_utils/fs/selected/build.rb
|
311
306
|
- lib/ehbrs_ruby_utils/fs/selected/build_file.rb
|
@@ -330,6 +325,8 @@ files:
|
|
330
325
|
- lib/ehbrs_ruby_utils/patches/object/template.rb
|
331
326
|
- lib/ehbrs_ruby_utils/version.rb
|
332
327
|
- lib/ehbrs_ruby_utils/vg.rb
|
328
|
+
- lib/ehbrs_ruby_utils/vg/ps2.rb
|
329
|
+
- lib/ehbrs_ruby_utils/vg/ps2/iso_file.rb
|
333
330
|
- lib/ehbrs_ruby_utils/vg/wii.rb
|
334
331
|
- lib/ehbrs_ruby_utils/vg/wii/file_move.rb
|
335
332
|
- lib/ehbrs_ruby_utils/vg/wii/game_file.rb
|