ehbrs-tools 0.42.0 → 0.43.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +68 -41
- data/lib/ehbrs/tools/executables.rb +2 -1
- data/lib/ehbrs/tools/runner/vg/{ips.rb → patch.rb} +6 -41
- data/lib/ehbrs/tools/runner.rb +7 -0
- data/lib/ehbrs/tools/version.rb +1 -1
- data/lib/ehbrs/tools/vg/patches/applier_factory.rb +43 -0
- data/lib/ehbrs/tools/vg/patches/base_applier.rb +37 -0
- data/lib/ehbrs/tools/vg/patches/ips_applier.rb +23 -0
- data/lib/ehbrs/tools/vg/patches/temp_files.rb +40 -0
- data/lib/ehbrs/tools/vg/patches/vcdiff_applier.rb +23 -0
- data/lib/ehbrs/tools/vg/patches.rb +13 -0
- data/lib/ehbrs/tools/vg.rb +11 -0
- metadata +40 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b67647b3e8bbe1427b85caf7f2c724b55220ca3e8697e779b94c6f4690467987
|
4
|
+
data.tar.gz: '09a70c265230d7f2c7ca356fe066bcf6ed5fec92c3ad1e1f6d9a68398e84fc6c'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50f4b112d1d55f4efb3e36676f2b38b17a85c4a2f00e206f71a6e0e9cdbfed10248fafae1fd863a6d6702bb22b1055b5f70ba6aac3c85b9f7bf751fcea02f9d6
|
7
|
+
data.tar.gz: a2ec31deaaf51ad578114f0a648660154ebacde92f85188ef94fecb95cc3d1170382c9cf410b8da6bb0405271faed88075be4ca04573551366ec82a16284263d
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ehbrs-tools (0.
|
4
|
+
ehbrs-tools (0.43.0)
|
5
5
|
avm-files (~> 0.7)
|
6
|
+
avm-tools (~> 0.161)
|
6
7
|
eac_cli (~> 0.42)
|
8
|
+
eac_fs (~> 0.18)
|
7
9
|
eac_ruby_base0 (~> 0.19)
|
8
10
|
eac_ruby_utils (~> 0.122)
|
9
11
|
ehbrs_ruby_utils (~> 0.44)
|
@@ -12,33 +14,24 @@ PATH
|
|
12
14
|
telegram-bot-ruby (~> 0.23)
|
13
15
|
|
14
16
|
PATH
|
15
|
-
remote: sub/
|
17
|
+
remote: sub/eac_fs
|
16
18
|
specs:
|
17
|
-
|
18
|
-
|
19
|
-
eac_ruby_utils (~> 0.122)
|
20
|
-
eac_templates (~> 0.7)
|
21
|
-
selenium-webdriver (~> 3.142, >= 3.142.7)
|
22
|
-
|
23
|
-
PATH
|
24
|
-
remote: sub/eac_cli
|
25
|
-
specs:
|
26
|
-
eac_cli (0.42.0)
|
27
|
-
colorize (~> 0.8, >= 0.8.1)
|
28
|
-
eac_config (~> 0.14, >= 0.14.2)
|
19
|
+
eac_fs (0.18.0)
|
20
|
+
content-type (~> 0.0, >= 0.0.2)
|
29
21
|
eac_ruby_utils (~> 0.122)
|
30
|
-
|
22
|
+
ruby-filemagic (~> 0.7, >= 0.7.3)
|
31
23
|
|
32
24
|
PATH
|
33
25
|
remote: sub/ehbrs_ruby_utils
|
34
26
|
specs:
|
35
|
-
ehbrs_ruby_utils (0.44.
|
27
|
+
ehbrs_ruby_utils (0.44.1)
|
36
28
|
aranha (~> 0.19, >= 0.19.2)
|
37
29
|
aranha-parsers (~> 0.22)
|
38
|
-
aranha-selenium (~> 0.11)
|
30
|
+
aranha-selenium (~> 0.11, >= 0.11.1)
|
39
31
|
avm (~> 0.92)
|
32
|
+
avm-eac_rails_base0 (~> 0.11, >= 0.11.1)
|
40
33
|
dentaku (~> 3.5, >= 3.5.2)
|
41
|
-
eac_fs (~> 0.
|
34
|
+
eac_fs (~> 0.18)
|
42
35
|
eac_rest (~> 0.12)
|
43
36
|
eac_ruby_utils (~> 0.122)
|
44
37
|
eac_templates (~> 0.7)
|
@@ -56,8 +49,8 @@ GEM
|
|
56
49
|
minitest (>= 5.1)
|
57
50
|
tzinfo (~> 2.0)
|
58
51
|
zeitwerk (~> 2.3)
|
59
|
-
addressable (2.8.
|
60
|
-
public_suffix (>= 2.0.2, <
|
52
|
+
addressable (2.8.7)
|
53
|
+
public_suffix (>= 2.0.2, < 7.0)
|
61
54
|
aranha (0.19.2)
|
62
55
|
aranha-parsers (~> 0.18)
|
63
56
|
aranha-selenium (~> 0.5)
|
@@ -69,6 +62,11 @@ GEM
|
|
69
62
|
eac_ruby_utils (~> 0.119, >= 0.119.2)
|
70
63
|
nokogiri (~> 1.15, >= 1.15.4)
|
71
64
|
ofx-parser (~> 1.1)
|
65
|
+
aranha-selenium (0.11.1)
|
66
|
+
eac_fs (~> 0.17)
|
67
|
+
eac_ruby_utils (~> 0.122)
|
68
|
+
eac_templates (~> 0.7)
|
69
|
+
selenium-webdriver (~> 3.142, >= 3.142.7)
|
72
70
|
ast (2.4.2)
|
73
71
|
avm (0.92.0)
|
74
72
|
eac_cli (~> 0.41)
|
@@ -82,27 +80,55 @@ GEM
|
|
82
80
|
avm-eac_generic_base0 (0.13.0)
|
83
81
|
avm (~> 0.90)
|
84
82
|
eac_ruby_utils (~> 0.121)
|
83
|
+
avm-eac_postgresql_base0 (0.5.3)
|
84
|
+
avm (~> 0.85)
|
85
|
+
eac_ruby_utils (~> 0.121)
|
86
|
+
avm-eac_rails_base0 (0.11.1)
|
87
|
+
avm-eac_rails_base1 (~> 0.10)
|
88
|
+
eac_ruby_utils (~> 0.121)
|
89
|
+
avm-eac_rails_base1 (0.10.0)
|
90
|
+
avm (~> 0.81)
|
91
|
+
avm-eac_ruby_base1 (~> 0.33)
|
92
|
+
avm-eac_webapp_base0 (~> 0.18, >= 0.18.2)
|
93
|
+
eac_ruby_utils (~> 0.119, >= 0.119.2)
|
85
94
|
avm-eac_ruby_base1 (0.34.1)
|
86
95
|
avm (~> 0.92)
|
87
96
|
avm-eac_generic_base0 (~> 0.13)
|
88
97
|
eac_envs-http (~> 0.5, >= 0.5.1)
|
89
98
|
eac_ruby_utils (~> 0.122)
|
99
|
+
avm-eac_ubuntu_base0 (0.5.1)
|
100
|
+
avm (~> 0.86, >= 0.86.2)
|
101
|
+
eac_ruby_utils (~> 0.121)
|
102
|
+
eac_templates (~> 0.5, >= 0.5.1)
|
103
|
+
avm-eac_webapp_base0 (0.19.0)
|
104
|
+
avm (~> 0.90)
|
105
|
+
avm-eac_generic_base0 (~> 0.13)
|
106
|
+
avm-eac_postgresql_base0 (~> 0.5, >= 0.5.3)
|
107
|
+
avm-eac_ubuntu_base0 (~> 0.5, >= 0.5.1)
|
108
|
+
avm-files (~> 0.7)
|
109
|
+
eac_ruby_utils (~> 0.121)
|
110
|
+
htmlbeautifier (~> 1.4, >= 1.4.3)
|
90
111
|
avm-files (0.7.0)
|
91
112
|
avm (~> 0.84, >= 0.84.2)
|
92
113
|
eac_cli (~> 0.40)
|
93
114
|
eac_fs (~> 0.17)
|
94
115
|
eac_ruby_utils (~> 0.121)
|
95
116
|
eac_templates (~> 0.5, >= 0.5.1)
|
117
|
+
avm-tools (0.161.0)
|
118
|
+
avm (~> 0.86, >= 0.86.1)
|
119
|
+
clipboard (~> 1.3, >= 1.3.6)
|
120
|
+
eac_ruby_base0 (~> 0.19)
|
96
121
|
axiom-types (0.1.1)
|
97
122
|
descendants_tracker (~> 0.0.4)
|
98
123
|
ice_nine (~> 0.11.0)
|
99
124
|
thread_safe (~> 0.3, >= 0.3.1)
|
100
125
|
base64 (0.2.0)
|
101
126
|
childprocess (3.0.0)
|
127
|
+
clipboard (1.4.1)
|
102
128
|
coercible (1.0.0)
|
103
129
|
descendants_tracker (~> 0.0.1)
|
104
130
|
colorize (0.8.1)
|
105
|
-
concurrent-ruby (1.3.
|
131
|
+
concurrent-ruby (1.3.3)
|
106
132
|
content-type (0.0.2)
|
107
133
|
parslet (~> 2.0)
|
108
134
|
dentaku (3.5.2)
|
@@ -110,7 +136,12 @@ GEM
|
|
110
136
|
descendants_tracker (0.0.4)
|
111
137
|
thread_safe (~> 0.3, >= 0.3.1)
|
112
138
|
diff-lcs (1.5.1)
|
113
|
-
dry-inflector (1.
|
139
|
+
dry-inflector (1.1.0)
|
140
|
+
eac_cli (0.42.0)
|
141
|
+
colorize (~> 0.8, >= 0.8.1)
|
142
|
+
eac_config (~> 0.14, >= 0.14.2)
|
143
|
+
eac_ruby_utils (~> 0.122)
|
144
|
+
tty-table (~> 0.12)
|
114
145
|
eac_config (0.14.2)
|
115
146
|
addressable (~> 2.8, >= 2.8.6)
|
116
147
|
eac_ruby_utils (~> 0.121)
|
@@ -125,10 +156,6 @@ GEM
|
|
125
156
|
faraday-gzip (~> 0.1)
|
126
157
|
faraday-multipart (~> 1.0, >= 1.0.4)
|
127
158
|
faraday-retry (~> 2.2)
|
128
|
-
eac_fs (0.17.0)
|
129
|
-
content-type (~> 0.0, >= 0.0.2)
|
130
|
-
eac_ruby_utils (~> 0.120)
|
131
|
-
ruby-filemagic (~> 0.7, >= 0.7.3)
|
132
159
|
eac_rest (0.12.0)
|
133
160
|
eac_envs-http (~> 0.5)
|
134
161
|
eac_fs (~> 0.16)
|
@@ -169,6 +196,7 @@ GEM
|
|
169
196
|
faraday (~> 2.0)
|
170
197
|
filesize (0.2.0)
|
171
198
|
hpricot (0.8.6)
|
199
|
+
htmlbeautifier (1.4.3)
|
172
200
|
i18n (1.14.5)
|
173
201
|
concurrent-ruby (~> 1.0)
|
174
202
|
ice_nine (0.11.2)
|
@@ -176,7 +204,7 @@ GEM
|
|
176
204
|
json (2.7.2)
|
177
205
|
language_server-protocol (3.17.0.3)
|
178
206
|
minitar (0.9)
|
179
|
-
minitest (5.
|
207
|
+
minitest (5.24.1)
|
180
208
|
multipart-post (2.4.1)
|
181
209
|
net-ssh (4.2.0)
|
182
210
|
nokogiri (1.15.6-x86_64-linux)
|
@@ -185,18 +213,18 @@ GEM
|
|
185
213
|
hpricot (>= 0.6)
|
186
214
|
os (1.1.4)
|
187
215
|
parallel (1.25.1)
|
188
|
-
parser (3.3.
|
216
|
+
parser (3.3.3.0)
|
189
217
|
ast (~> 2.4.1)
|
190
218
|
racc
|
191
219
|
parslet (2.0.0)
|
192
220
|
pastel (0.8.0)
|
193
221
|
tty-color (~> 0.5)
|
194
|
-
public_suffix (5.
|
222
|
+
public_suffix (5.1.1)
|
195
223
|
racc (1.8.0)
|
196
|
-
rack (3.
|
224
|
+
rack (3.1.6)
|
197
225
|
rainbow (3.1.1)
|
198
226
|
regexp_parser (2.9.2)
|
199
|
-
rexml (3.
|
227
|
+
rexml (3.3.1)
|
200
228
|
strscan
|
201
229
|
rspec (3.13.0)
|
202
230
|
rspec-core (~> 3.13.0)
|
@@ -204,7 +232,7 @@ GEM
|
|
204
232
|
rspec-mocks (~> 3.13.0)
|
205
233
|
rspec-core (3.13.0)
|
206
234
|
rspec-support (~> 3.13.0)
|
207
|
-
rspec-expectations (3.13.
|
235
|
+
rspec-expectations (3.13.1)
|
208
236
|
diff-lcs (>= 1.2.0, < 2.0)
|
209
237
|
rspec-support (~> 3.13.0)
|
210
238
|
rspec-mocks (3.13.1)
|
@@ -226,9 +254,9 @@ GEM
|
|
226
254
|
parser (>= 3.3.1.0)
|
227
255
|
rubocop-capybara (2.21.0)
|
228
256
|
rubocop (~> 1.41)
|
229
|
-
rubocop-factory_bot (2.26.
|
230
|
-
rubocop (~> 1.
|
231
|
-
rubocop-rails (2.25.
|
257
|
+
rubocop-factory_bot (2.26.1)
|
258
|
+
rubocop (~> 1.61)
|
259
|
+
rubocop-rails (2.25.1)
|
232
260
|
activesupport (>= 4.2.0)
|
233
261
|
rack (>= 1.1)
|
234
262
|
rubocop (>= 1.33.0, < 2.0)
|
@@ -238,8 +266,8 @@ GEM
|
|
238
266
|
rubocop-capybara (~> 2.17)
|
239
267
|
rubocop-factory_bot (~> 2.22)
|
240
268
|
rubocop-rspec_rails (~> 2.28)
|
241
|
-
rubocop-rspec_rails (2.29.
|
242
|
-
rubocop (~> 1.
|
269
|
+
rubocop-rspec_rails (2.29.1)
|
270
|
+
rubocop (~> 1.61)
|
243
271
|
ruby-filemagic (0.7.3)
|
244
272
|
ruby-progressbar (1.13.0)
|
245
273
|
ruby2_keywords (0.0.5)
|
@@ -278,16 +306,15 @@ GEM
|
|
278
306
|
axiom-types (~> 0.1)
|
279
307
|
coercible (~> 1.0)
|
280
308
|
descendants_tracker (~> 0.0, >= 0.0.3)
|
281
|
-
zeitwerk (2.6.
|
309
|
+
zeitwerk (2.6.16)
|
282
310
|
zlib (2.1.1)
|
283
311
|
|
284
312
|
PLATFORMS
|
285
313
|
x86_64-linux
|
286
314
|
|
287
315
|
DEPENDENCIES
|
288
|
-
|
289
|
-
|
290
|
-
eac_ruby_gem_support (~> 0.9)
|
316
|
+
eac_fs!
|
317
|
+
eac_ruby_gem_support (~> 0.10)
|
291
318
|
ehbrs-tools!
|
292
319
|
ehbrs_ruby_utils!
|
293
320
|
|
@@ -2,13 +2,14 @@
|
|
2
2
|
|
3
3
|
require 'eac_cli/core_ext'
|
4
4
|
require 'eac_ruby_utils/fs/temp'
|
5
|
-
require 'ehbrs/tools/
|
5
|
+
require 'ehbrs/tools/vg/patches/applier_factory'
|
6
|
+
require 'ehbrs/tools/vg/patches/temp_files'
|
6
7
|
|
7
8
|
module Ehbrs
|
8
9
|
module Tools
|
9
10
|
class Runner
|
10
11
|
class Vg
|
11
|
-
class
|
12
|
+
class Patch
|
12
13
|
runner_with :help do
|
13
14
|
desc 'Aplica patches IPS em roms.'
|
14
15
|
arg_opt '-o', '--output-file', ' Saída no arquivo <output-file>.'
|
@@ -29,21 +30,14 @@ module Ehbrs
|
|
29
30
|
def on_temp_files
|
30
31
|
::EacRubyUtils::Fs::Temp.on_file do |input|
|
31
32
|
::EacRubyUtils::Fs::Temp.on_file do |output|
|
32
|
-
yield TempFiles.new(source_file, input, output)
|
33
|
+
yield ::Ehbrs::Tools::Vg::Patches::TempFiles.new(source_file, input, output)
|
33
34
|
end
|
34
35
|
end
|
35
36
|
end
|
36
37
|
|
37
38
|
def run_patch(source_path, ips_path, output_path)
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
command.system!
|
42
|
-
|
43
|
-
return if output_path.exist?
|
44
|
-
|
45
|
-
fatal_error("\"#{command}\" exited without error, but output file \"#{output_path}\"" \
|
46
|
-
'does not exist')
|
39
|
+
::Ehbrs::Tools::Vg::Patches::ApplierFactory.new(ips_path)
|
40
|
+
.apply(source_path, output_path)
|
47
41
|
end
|
48
42
|
|
49
43
|
def run_patches
|
@@ -105,35 +99,6 @@ module Ehbrs
|
|
105
99
|
|
106
100
|
fatal_error("Arquivo de saída \"#{output_file}\" já existe")
|
107
101
|
end
|
108
|
-
|
109
|
-
class TempFiles
|
110
|
-
common_constructor :initial, :temp0, :temp1
|
111
|
-
|
112
|
-
def input
|
113
|
-
swaped? ? temp0 : initial
|
114
|
-
end
|
115
|
-
|
116
|
-
def move_result_to(dest)
|
117
|
-
return unless swaped?
|
118
|
-
|
119
|
-
::FileUtils.mv(temp0.to_path, dest.to_path)
|
120
|
-
end
|
121
|
-
|
122
|
-
def output
|
123
|
-
temp1
|
124
|
-
end
|
125
|
-
|
126
|
-
def swap
|
127
|
-
temp0_current = temp0
|
128
|
-
self.temp0 = temp1
|
129
|
-
self.temp1 = temp0_current
|
130
|
-
@swaped = true
|
131
|
-
end
|
132
|
-
|
133
|
-
def swaped?
|
134
|
-
@swaped ? true : false
|
135
|
-
end
|
136
|
-
end
|
137
102
|
end
|
138
103
|
end
|
139
104
|
end
|
data/lib/ehbrs/tools/runner.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'avm/tools/runner'
|
3
4
|
require 'eac_ruby_base0/runner'
|
4
5
|
require 'ehbrs/tools/application'
|
5
6
|
|
@@ -16,6 +17,12 @@ module Ehbrs
|
|
16
17
|
def application
|
17
18
|
::Ehbrs::Tools.application
|
18
19
|
end
|
20
|
+
|
21
|
+
def extra_available_subcommands
|
22
|
+
{
|
23
|
+
'avm' => ::Avm::Tools::Runner
|
24
|
+
}
|
25
|
+
end
|
19
26
|
end
|
20
27
|
end
|
21
28
|
end
|
data/lib/ehbrs/tools/version.rb
CHANGED
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_fs/core_ext'
|
4
|
+
require 'ehbrs/tools/vg/patches/ips_applier'
|
5
|
+
require 'ehbrs/tools/vg/patches/vcdiff_applier'
|
6
|
+
|
7
|
+
module Ehbrs
|
8
|
+
module Tools
|
9
|
+
module Vg
|
10
|
+
module Patches
|
11
|
+
class ApplierFactory
|
12
|
+
APPLIERS_BY_TYPE = {
|
13
|
+
'IPS patch file' => ::Ehbrs::Tools::Vg::Patches::IpsApplier,
|
14
|
+
'VCDIFF binary diff' => ::Ehbrs::Tools::Vg::Patches::VcdiffApplier
|
15
|
+
}.freeze
|
16
|
+
|
17
|
+
enable_simple_cache
|
18
|
+
common_constructor :patch_path do
|
19
|
+
self.patch_path = patch_path.to_pathname
|
20
|
+
end
|
21
|
+
delegate :apply, to: :applier_instance
|
22
|
+
|
23
|
+
# @return [String]
|
24
|
+
def patch_type
|
25
|
+
patch_path.info.description
|
26
|
+
end
|
27
|
+
|
28
|
+
protected
|
29
|
+
|
30
|
+
# @return [Class]
|
31
|
+
def applier_class_uncached
|
32
|
+
APPLIERS_BY_TYPE.fetch(patch_type)
|
33
|
+
end
|
34
|
+
|
35
|
+
# @return [Object]
|
36
|
+
def applier_instance_uncached
|
37
|
+
applier_class.new(patch_path)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Ehbrs
|
6
|
+
module Tools
|
7
|
+
module Vg
|
8
|
+
module Patches
|
9
|
+
class BaseApplier
|
10
|
+
acts_as_abstract
|
11
|
+
common_constructor :patch_path
|
12
|
+
|
13
|
+
# @param source_path [Pathname]
|
14
|
+
# @param output_path [Pathname]
|
15
|
+
# @raise [RuntimeError] Se o arquivo de saída não é criado.
|
16
|
+
def apply(source_path, output_path)
|
17
|
+
source_path = source_path.to_pathname
|
18
|
+
output_path = output_path.to_pathname
|
19
|
+
command(source_path, output_path).system!
|
20
|
+
|
21
|
+
return if output_path.exist?
|
22
|
+
|
23
|
+
fatal_error("Applier returned without error, but output file \"#{output_path}\"" \
|
24
|
+
'does not exist')
|
25
|
+
end
|
26
|
+
|
27
|
+
# @param source_path [Pathname]
|
28
|
+
# @param output_path [Pathname]
|
29
|
+
# @return [EacRubyUtils::Envs::Command]
|
30
|
+
def command(source_path, output_path)
|
31
|
+
raise_abstract_method __method__, source_path, output_path
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
require 'ehbrs/tools/executables'
|
5
|
+
require 'ehbrs/tools/vg/patches/base_applier'
|
6
|
+
|
7
|
+
module Ehbrs
|
8
|
+
module Tools
|
9
|
+
module Vg
|
10
|
+
module Patches
|
11
|
+
class IpsApplier < ::Ehbrs::Tools::Vg::Patches::BaseApplier
|
12
|
+
# @param source_path [Pathname]
|
13
|
+
# @param output_path [Pathname]
|
14
|
+
# @return [EacRubyUtils::Envs::Command]
|
15
|
+
def command(source_path, output_path)
|
16
|
+
::Ehbrs::Tools::Executables.flips.command
|
17
|
+
.append(['--apply', patch_path, source_path, output_path])
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Ehbrs
|
6
|
+
module Tools
|
7
|
+
module Vg
|
8
|
+
module Patches
|
9
|
+
class TempFiles
|
10
|
+
common_constructor :initial, :temp0, :temp1
|
11
|
+
|
12
|
+
def input
|
13
|
+
swaped? ? temp0 : initial
|
14
|
+
end
|
15
|
+
|
16
|
+
def move_result_to(dest)
|
17
|
+
return unless swaped?
|
18
|
+
|
19
|
+
::FileUtils.mv(temp0.to_path, dest.to_path)
|
20
|
+
end
|
21
|
+
|
22
|
+
def output
|
23
|
+
temp1
|
24
|
+
end
|
25
|
+
|
26
|
+
def swap
|
27
|
+
temp0_current = temp0
|
28
|
+
self.temp0 = temp1
|
29
|
+
self.temp1 = temp0_current
|
30
|
+
@swaped = true
|
31
|
+
end
|
32
|
+
|
33
|
+
def swaped?
|
34
|
+
@swaped ? true : false
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
require 'ehbrs/tools/executables'
|
5
|
+
require 'ehbrs/tools/vg/patches/base_applier'
|
6
|
+
|
7
|
+
module Ehbrs
|
8
|
+
module Tools
|
9
|
+
module Vg
|
10
|
+
module Patches
|
11
|
+
class VcdiffApplier < ::Ehbrs::Tools::Vg::Patches::BaseApplier
|
12
|
+
# @param source_path [Pathname]
|
13
|
+
# @param output_path [Pathname]
|
14
|
+
# @return [EacRubyUtils::Envs::Command]
|
15
|
+
def command(source_path, output_path)
|
16
|
+
::Ehbrs::Tools::Executables.xdelta3.command
|
17
|
+
.append(['-d', '-s', source_path, patch_path, output_path])
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ehbrs-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.43.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esquilo Azul Company
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: avm-files
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: avm-tools
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.161'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.161'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: eac_cli
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,6 +52,20 @@ dependencies:
|
|
38
52
|
- - "~>"
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '0.42'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: eac_fs
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.18'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.18'
|
41
69
|
- !ruby/object:Gem::Dependency
|
42
70
|
name: eac_ruby_base0
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -134,14 +162,14 @@ dependencies:
|
|
134
162
|
requirements:
|
135
163
|
- - "~>"
|
136
164
|
- !ruby/object:Gem::Version
|
137
|
-
version: '0.
|
165
|
+
version: '0.10'
|
138
166
|
type: :development
|
139
167
|
prerelease: false
|
140
168
|
version_requirements: !ruby/object:Gem::Requirement
|
141
169
|
requirements:
|
142
170
|
- - "~>"
|
143
171
|
- !ruby/object:Gem::Version
|
144
|
-
version: '0.
|
172
|
+
version: '0.10'
|
145
173
|
description:
|
146
174
|
email:
|
147
175
|
executables:
|
@@ -195,7 +223,7 @@ files:
|
|
195
223
|
- lib/ehbrs/tools/runner/telegram.rb
|
196
224
|
- lib/ehbrs/tools/runner/telegram/send_message.rb
|
197
225
|
- lib/ehbrs/tools/runner/vg.rb
|
198
|
-
- lib/ehbrs/tools/runner/vg/
|
226
|
+
- lib/ehbrs/tools/runner/vg/patch.rb
|
199
227
|
- lib/ehbrs/tools/runner/vg/ps2.rb
|
200
228
|
- lib/ehbrs/tools/runner/vg/ps2/rename.rb
|
201
229
|
- lib/ehbrs/tools/runner/vg/wii.rb
|
@@ -221,6 +249,13 @@ files:
|
|
221
249
|
- lib/ehbrs/tools/runner/web_utils/videos/download.rb
|
222
250
|
- lib/ehbrs/tools/runner/web_utils/videos/upload.rb
|
223
251
|
- lib/ehbrs/tools/version.rb
|
252
|
+
- lib/ehbrs/tools/vg.rb
|
253
|
+
- lib/ehbrs/tools/vg/patches.rb
|
254
|
+
- lib/ehbrs/tools/vg/patches/applier_factory.rb
|
255
|
+
- lib/ehbrs/tools/vg/patches/base_applier.rb
|
256
|
+
- lib/ehbrs/tools/vg/patches/ips_applier.rb
|
257
|
+
- lib/ehbrs/tools/vg/patches/temp_files.rb
|
258
|
+
- lib/ehbrs/tools/vg/patches/vcdiff_applier.rb
|
224
259
|
- lib/ehbrs/user_dirs.rb
|
225
260
|
- template/ehbrs/cooking_book/build/base_page/layout.html.erb
|
226
261
|
- template/ehbrs/cooking_book/build/index_page/inner.html.erb
|