ehbrs-tools 0.43.1 → 0.44.1

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.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +170 -151
  3. data/exe/ehbrs +1 -1
  4. data/lib/ehbrs/tools/application.rb +7 -5
  5. data/lib/ehbrs/tools/core_ext.rb +0 -2
  6. data/lib/ehbrs/tools/executables.rb +0 -16
  7. data/lib/ehbrs/tools/google/translate/session.rb +61 -0
  8. data/lib/ehbrs/tools/instance.rb +0 -3
  9. data/lib/ehbrs/tools/observers/base.rb +63 -0
  10. data/lib/ehbrs/tools/observers/with_persistence.rb +33 -0
  11. data/lib/ehbrs/tools/runner/booking/accommodations.rb +0 -3
  12. data/lib/ehbrs/tools/runner/booking.rb +0 -2
  13. data/lib/ehbrs/tools/runner/cooking_book/build.rb +0 -4
  14. data/lib/ehbrs/tools/runner/cooking_book.rb +0 -3
  15. data/lib/ehbrs/tools/runner/finances/bb_browser.rb +0 -3
  16. data/lib/ehbrs/tools/runner/finances.rb +0 -2
  17. data/lib/ehbrs/tools/runner/fs/selected.rb +0 -5
  18. data/lib/ehbrs/tools/runner/fs/used_space.rb +1 -5
  19. data/lib/ehbrs/tools/runner/fs.rb +0 -2
  20. data/lib/ehbrs/tools/runner/google/translate.rb +1 -5
  21. data/lib/ehbrs/tools/runner/google.rb +0 -2
  22. data/lib/ehbrs/tools/runner/music/lyrics.rb +0 -4
  23. data/lib/ehbrs/tools/runner/music/lyrics_book.rb +0 -5
  24. data/lib/ehbrs/tools/runner/music/selected.rb +0 -3
  25. data/lib/ehbrs/tools/runner/music/sort/dump.rb +0 -4
  26. data/lib/ehbrs/tools/runner/music/sort/load.rb +0 -2
  27. data/lib/ehbrs/tools/runner/music/sort/shuffle.rb +0 -3
  28. data/lib/ehbrs/tools/runner/music/sort.rb +0 -3
  29. data/lib/ehbrs/tools/runner/music/spread.rb +0 -4
  30. data/lib/ehbrs/tools/runner/music.rb +0 -2
  31. data/lib/ehbrs/tools/runner/telegram/send_message.rb +1 -4
  32. data/lib/ehbrs/tools/runner/telegram.rb +0 -3
  33. data/lib/ehbrs/tools/runner/vg/patch.rb +2 -7
  34. data/lib/ehbrs/tools/runner/vg/ps2/rename.rb +0 -3
  35. data/lib/ehbrs/tools/runner/vg/ps2.rb +0 -2
  36. data/lib/ehbrs/tools/runner/vg/wii.rb +0 -5
  37. data/lib/ehbrs/tools/runner/vg.rb +0 -2
  38. data/lib/ehbrs/tools/runner/videos/extract.rb +0 -3
  39. data/lib/ehbrs/tools/runner/videos/languages/file_runner.rb +1 -4
  40. data/lib/ehbrs/tools/runner/videos/languages/labelized.rb +0 -2
  41. data/lib/ehbrs/tools/runner/videos/languages/language.rb +0 -3
  42. data/lib/ehbrs/tools/runner/videos/languages/track.rb +0 -3
  43. data/lib/ehbrs/tools/runner/videos/languages.rb +0 -5
  44. data/lib/ehbrs/tools/runner/videos/opensubtitles.rb +0 -3
  45. data/lib/ehbrs/tools/runner/videos/probe.rb +0 -4
  46. data/lib/ehbrs/tools/runner/videos/series/rename.rb +0 -5
  47. data/lib/ehbrs/tools/runner/videos/series.rb +0 -2
  48. data/lib/ehbrs/tools/runner/videos/subtitles/sanitize.rb +0 -3
  49. data/lib/ehbrs/tools/runner/videos/subtitles.rb +0 -2
  50. data/lib/ehbrs/tools/runner/videos/unsupported.rb +0 -5
  51. data/lib/ehbrs/tools/runner/videos.rb +0 -2
  52. data/lib/ehbrs/tools/runner/web_utils/finances/bills/consume.rb +0 -4
  53. data/lib/ehbrs/tools/runner/web_utils/finances/bills.rb +0 -2
  54. data/lib/ehbrs/tools/runner/web_utils/finances.rb +0 -2
  55. data/lib/ehbrs/tools/runner/web_utils/videos/download.rb +0 -3
  56. data/lib/ehbrs/tools/runner/web_utils/videos/upload.rb +0 -5
  57. data/lib/ehbrs/tools/runner/web_utils/videos.rb +0 -2
  58. data/lib/ehbrs/tools/runner/web_utils.rb +0 -3
  59. data/lib/ehbrs/tools/runner.rb +1 -7
  60. data/lib/ehbrs/tools/self/observers/used_space.rb +22 -0
  61. data/lib/ehbrs/tools/self/observers/with_persistence.rb +37 -0
  62. data/lib/ehbrs/tools/telegram/message_sending.rb +30 -0
  63. data/lib/ehbrs/tools/user_dirs.rb +33 -0
  64. data/lib/ehbrs/tools/version.rb +1 -1
  65. data/lib/ehbrs/tools.rb +7 -2
  66. metadata +47 -54
  67. data/lib/ehbrs/google/translate/session.rb +0 -61
  68. data/lib/ehbrs/google/translate.rb +0 -11
  69. data/lib/ehbrs/google.rb +0 -9
  70. data/lib/ehbrs/music.rb +0 -9
  71. data/lib/ehbrs/observers/base.rb +0 -63
  72. data/lib/ehbrs/observers/with_persistence.rb +0 -34
  73. data/lib/ehbrs/observers.rb +0 -11
  74. data/lib/ehbrs/self/observers/used_space.rb +0 -22
  75. data/lib/ehbrs/self/observers/with_persistence.rb +0 -38
  76. data/lib/ehbrs/self.rb +0 -9
  77. data/lib/ehbrs/telegram/message_sending.rb +0 -31
  78. data/lib/ehbrs/telegram.rb +0 -9
  79. data/lib/ehbrs/tools/vg/patches/applier_factory.rb +0 -43
  80. data/lib/ehbrs/tools/vg/patches/base_applier.rb +0 -37
  81. data/lib/ehbrs/tools/vg/patches/ips_applier.rb +0 -23
  82. data/lib/ehbrs/tools/vg/patches/temp_files.rb +0 -40
  83. data/lib/ehbrs/tools/vg/patches/vcdiff_applier.rb +0 -23
  84. data/lib/ehbrs/tools/vg/patches.rb +0 -13
  85. data/lib/ehbrs/tools/vg.rb +0 -11
  86. data/lib/ehbrs/user_dirs.rb +0 -34
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e45e64b77ae77e9af92cfafbb577fa7987e606d7f0fa93664a75deb062f67a27
4
- data.tar.gz: 3dc86a1836d04c33388fb6507b9f97445e401fb9018f6c6c83ea4d517262eccf
3
+ metadata.gz: e190e89a928173f9fc58574e003f1072d3dac04227ec3e6e8e929e21baa3c4f5
4
+ data.tar.gz: aec37125c29a31d2f79d9443444a6159c173a68e3e7600f1515dab8f46b2b448
5
5
  SHA512:
6
- metadata.gz: daa939efe9ee2a69b8157ff770ef8b6fea1438500504da2caa4dd15ae74ee233b4ce6f59e3a8a34ff227fe1b7a26cee413bfd5de31defcda34dc98745c039460
7
- data.tar.gz: acb4a84c2577bb957dc821a991ae4651b2026daccf07b46301a7eee0a7e5cb61021536ae8663ad494ffab7a7256c0d08529d9601c61eddaa28b10258d761357d
6
+ metadata.gz: 64816ee18b95f04d1953bf0d8e67367b43e91c262d04ef21cd8995bbfcd65a8ed98730e908dd92263c521fd81f5539791586f56a382154c941dcdbb61800391a
7
+ data.tar.gz: e8455291cb23ad4c6ba1a2bc1cfb42a48e17eea64b95cfb82a685a18553f0f1e7be9999d1b3800e4a80bbab0ff11797778ac73dd168f0800b7fef0ee143afe50
data/Gemfile.lock CHANGED
@@ -1,47 +1,67 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ehbrs-tools (0.43.1)
5
- avm-files (~> 0.8, >= 0.8.1)
6
- avm-tools (~> 0.162)
7
- eac_cli (~> 0.42)
8
- eac_fs (~> 0.18, >= 0.18.1)
9
- eac_ruby_base0 (~> 0.19)
10
- eac_ruby_utils (~> 0.124)
11
- ehbrs_ruby_utils (~> 0.44, >= 0.44.3)
4
+ ehbrs-tools (0.44.1)
5
+ avm-files (~> 0.9)
6
+ avm-tools (~> 0.163, >= 0.163.3)
7
+ eac_cli (~> 0.43, >= 0.43.1)
8
+ eac_fs (~> 0.19)
9
+ eac_ruby_base0 (~> 0.19, >= 0.19.2)
10
+ eac_ruby_utils (~> 0.128, >= 0.128.3)
11
+ ehbrs_ruby_utils (~> 0.45)
12
12
  filesize (~> 0.2)
13
13
  os (~> 1.1, >= 1.1.4)
14
14
  telegram-bot-ruby (~> 0.23)
15
15
 
16
16
  PATH
17
- remote: sub/aranha-parsers
17
+ remote: sub/avm-eac_ruby_base1
18
18
  specs:
19
- aranha-parsers (0.25.0)
20
- activesupport (>= 4.0.0)
21
- addressable (~> 2.8, >= 2.8.7)
22
- eac_envs-http (~> 0.6, >= 0.6.1)
23
- eac_ruby_utils (~> 0.124)
24
- nokogiri (~> 1.15, >= 1.15.7)
25
- ofx-parser (~> 1.1)
19
+ avm-eac_ruby_base1 (0.37.1)
20
+ avm (~> 0.96, >= 0.96.1)
21
+ avm-eac_generic_base0 (~> 0.15, >= 0.15.1)
22
+ eac_envs-http (~> 0.7)
23
+ eac_ruby_utils (~> 0.128, >= 0.128.3)
26
24
 
27
25
  PATH
28
- remote: sub/ehbrs_ruby_utils
26
+ remote: sub/eac_cli
29
27
  specs:
30
- ehbrs_ruby_utils (0.44.3)
31
- aranha (~> 0.19, >= 0.19.2)
32
- aranha-parsers (~> 0.25)
33
- aranha-selenium (~> 0.11, >= 0.11.1)
34
- avm (~> 0.94, >= 0.94.1)
35
- avm-eac_rails_base0 (~> 0.11, >= 0.11.1)
36
- dentaku (~> 3.5, >= 3.5.4)
37
- eac_fs (~> 0.18, >= 0.18.1)
38
- eac_rest (~> 0.12)
39
- eac_ruby_utils (~> 0.124)
40
- eac_templates (~> 0.7, >= 0.7.1)
41
- inifile (~> 3.0)
42
- srt (~> 0.1, >= 0.1.5)
43
- taglib-ruby (~> 1.1, >= 1.1.3)
44
- ultimate_lyrics (~> 0.1, >= 0.1.3)
28
+ eac_cli (0.43.1)
29
+ colorize (~> 0.8, >= 0.8.1)
30
+ eac_config (~> 0.15)
31
+ eac_ruby_utils (~> 0.128, >= 0.128.3)
32
+ tty-table (~> 0.12)
33
+
34
+ PATH
35
+ remote: sub/eac_envs-http
36
+ specs:
37
+ eac_envs-http (0.7.0)
38
+ eac_fs (~> 0.19)
39
+ eac_ruby_utils (~> 0.128, >= 0.128.3)
40
+ faraday (~> 2.8, >= 2.8.1)
41
+ faraday-follow_redirects (~> 0.3)
42
+ faraday-gzip (~> 0.1)
43
+ faraday-multipart (~> 1.1, >= 1.1.1)
44
+ faraday-retry (~> 2.3, >= 2.3.2)
45
+ random-port (~> 0.7, >= 0.7.1)
46
+
47
+ PATH
48
+ remote: sub/eac_fs
49
+ specs:
50
+ eac_fs (0.19.1)
51
+ content-type (~> 0.0, >= 0.0.2)
52
+ eac_ruby_utils (~> 0.128, >= 0.128.3)
53
+ ruby-filemagic (~> 0.7, >= 0.7.3)
54
+
55
+ PATH
56
+ remote: sub/eac_ruby_utils
57
+ specs:
58
+ eac_ruby_utils (0.128.3)
59
+ activesupport (>= 4, < 7)
60
+ addressable (~> 2.8, >= 2.8.7)
61
+ bundler
62
+ filesize (~> 0.2)
63
+ net-ssh (~> 4.2)
64
+ zeitwerk (~> 2.6, >= 2.6.18)
45
65
 
46
66
  GEM
47
67
  remote: https://rubygems.org/
@@ -54,28 +74,37 @@ GEM
54
74
  zeitwerk (~> 2.3)
55
75
  addressable (2.8.7)
56
76
  public_suffix (>= 2.0.2, < 7.0)
57
- aranha (0.19.2)
58
- aranha-parsers (~> 0.18)
59
- aranha-selenium (~> 0.5)
60
- eac_ruby_utils (~> 0.116)
61
- aranha-selenium (0.11.1)
62
- eac_fs (~> 0.17)
63
- eac_ruby_utils (~> 0.122)
64
- eac_templates (~> 0.7)
77
+ aranha (0.20.0)
78
+ eac_ruby_utils (~> 0.128)
79
+ aranha-parsers (0.26.1)
80
+ activesupport (>= 4.0.0)
81
+ addressable (~> 2.8, >= 2.8.7)
82
+ aranha (~> 0.20)
83
+ eac_envs-http (~> 0.6, >= 0.6.1)
84
+ eac_ruby_utils (~> 0.128, >= 0.128.1)
85
+ nokogiri (~> 1.15, >= 1.15.7)
86
+ ofx-parser (~> 1.1)
87
+ aranha-selenium (0.12.0)
88
+ aranha (~> 0.20)
89
+ eac_fs (~> 0.18, >= 0.18.1)
90
+ eac_ruby_utils (~> 0.128)
91
+ eac_templates (~> 0.8, >= 0.8.1)
65
92
  selenium-webdriver (~> 3.142, >= 3.142.7)
66
- ast (2.4.2)
67
- avm (0.94.1)
68
- eac_cli (~> 0.42)
69
- eac_config (~> 0.14, >= 0.14.3)
93
+ ast (2.4.3)
94
+ attr_extras (7.1.0)
95
+ avm (0.96.1)
96
+ clipboard (~> 1.4, >= 1.4.1)
97
+ eac_cli (~> 0.43)
98
+ eac_config (~> 0.15)
70
99
  eac_docker (~> 0.7)
71
100
  eac_fs (~> 0.18, >= 0.18.1)
72
- eac_ruby_utils (~> 0.124)
73
- eac_templates (~> 0.7, >= 0.7.1)
101
+ eac_ruby_utils (~> 0.128)
102
+ eac_templates (~> 0.8, >= 0.8.1)
74
103
  minitar (~> 0.12, >= 0.12.1)
75
104
  ruby-progressbar (~> 1.13)
76
- avm-eac_generic_base0 (0.14.0)
77
- avm (~> 0.94, >= 0.94.1)
78
- eac_ruby_utils (~> 0.124)
105
+ avm-eac_generic_base0 (0.15.1)
106
+ avm (~> 0.96, >= 0.96.1)
107
+ eac_ruby_utils (~> 0.128)
79
108
  avm-eac_postgresql_base0 (0.5.3)
80
109
  avm (~> 0.85)
81
110
  eac_ruby_utils (~> 0.121)
@@ -87,45 +116,36 @@ GEM
87
116
  avm-eac_ruby_base1 (~> 0.35, >= 0.35.1)
88
117
  avm-eac_webapp_base0 (~> 0.20, >= 0.20.1)
89
118
  eac_ruby_utils (~> 0.123)
90
- avm-eac_ruby_base1 (0.35.1)
91
- avm (~> 0.94)
92
- avm-eac_generic_base0 (~> 0.13)
93
- eac_envs-http (~> 0.5, >= 0.5.1)
94
- eac_ruby_utils (~> 0.122)
95
119
  avm-eac_ubuntu_base0 (0.5.1)
96
120
  avm (~> 0.86, >= 0.86.2)
97
121
  eac_ruby_utils (~> 0.121)
98
122
  eac_templates (~> 0.5, >= 0.5.1)
99
- avm-eac_webapp_base0 (0.20.1)
100
- avm (~> 0.94)
101
- avm-eac_generic_base0 (~> 0.13)
123
+ avm-eac_webapp_base0 (0.21.1)
124
+ avm (~> 0.96, >= 0.96.1)
125
+ avm-eac_generic_base0 (~> 0.15, >= 0.15.1)
102
126
  avm-eac_postgresql_base0 (~> 0.5, >= 0.5.3)
103
127
  avm-eac_ubuntu_base0 (~> 0.5, >= 0.5.1)
104
- avm-files (~> 0.8)
105
- eac_ruby_utils (~> 0.122)
128
+ avm-files (~> 0.9)
129
+ eac_ruby_utils (~> 0.128)
106
130
  htmlbeautifier (~> 1.4, >= 1.4.3)
107
- avm-files (0.8.1)
108
- avm (~> 0.93)
109
- eac_cli (~> 0.42)
110
- eac_fs (~> 0.18)
111
- eac_ruby_utils (~> 0.122)
112
- eac_templates (~> 0.7, >= 0.7.1)
113
- avm-tools (0.162.0)
114
- avm (~> 0.94)
131
+ avm-files (0.9.0)
132
+ avm (~> 0.95)
133
+ avm-tools (0.163.3)
134
+ avm (~> 0.96, >= 0.96.1)
115
135
  clipboard (~> 1.4, >= 1.4.1)
116
- eac_ruby_base0 (~> 0.19)
136
+ eac_ruby_base0 (~> 0.19, >= 0.19.1)
117
137
  axiom-types (0.1.1)
118
138
  descendants_tracker (~> 0.0.4)
119
139
  ice_nine (~> 0.11.0)
120
140
  thread_safe (~> 0.3, >= 0.3.1)
121
- base64 (0.2.0)
122
- bigdecimal (3.1.8)
141
+ base64 (0.3.0)
142
+ bigdecimal (3.2.2)
123
143
  childprocess (3.0.0)
124
144
  clipboard (1.4.1)
125
145
  coercible (1.0.0)
126
146
  descendants_tracker (~> 0.0.1)
127
147
  colorize (0.8.1)
128
- concurrent-ruby (1.3.4)
148
+ concurrent-ruby (1.3.5)
129
149
  content-type (0.0.2)
130
150
  parslet (~> 2.0)
131
151
  dentaku (3.5.4)
@@ -133,56 +153,48 @@ GEM
133
153
  concurrent-ruby
134
154
  descendants_tracker (0.0.4)
135
155
  thread_safe (~> 0.3, >= 0.3.1)
136
- diff-lcs (1.5.1)
156
+ diff-lcs (1.6.2)
137
157
  dry-inflector (1.1.0)
138
- eac_cli (0.42.0)
139
- colorize (~> 0.8, >= 0.8.1)
140
- eac_config (~> 0.14, >= 0.14.2)
141
- eac_ruby_utils (~> 0.122)
142
- tty-table (~> 0.12)
143
- eac_config (0.14.3)
158
+ eac_config (0.15.0)
144
159
  addressable (~> 2.8, >= 2.8.7)
145
- eac_ruby_utils (~> 0.124)
160
+ eac_ruby_utils (~> 0.127)
146
161
  eac_docker (0.7.0)
147
162
  eac_ruby_utils (~> 0.112)
148
163
  eac_templates (~> 0.3, >= 0.3.2)
149
- eac_envs-http (0.6.1)
150
- eac_fs (~> 0.18, >= 0.18.1)
151
- eac_ruby_utils (~> 0.123)
152
- faraday (~> 2.8, >= 2.8.1)
153
- faraday-follow_redirects (~> 0.3)
154
- faraday-gzip (~> 0.1)
155
- faraday-multipart (~> 1.0, >= 1.0.4)
156
- faraday-retry (~> 2.2, >= 2.2.1)
157
- random-port (~> 0.7, >= 0.7.1)
158
- eac_fs (0.18.1)
159
- content-type (~> 0.0, >= 0.0.2)
160
- eac_ruby_utils (~> 0.123)
161
- ruby-filemagic (~> 0.7, >= 0.7.3)
162
164
  eac_rest (0.12.0)
163
165
  eac_envs-http (~> 0.5)
164
166
  eac_fs (~> 0.16)
165
167
  eac_ruby_utils (~> 0.120)
166
- eac_ruby_base0 (0.19.0)
167
- avm-eac_ruby_base1 (~> 0.30, >= 0.30.3)
168
- eac_cli (~> 0.35)
169
- eac_fs (~> 0.16)
170
- eac_ruby_utils (~> 0.117)
171
- eac_ruby_gem_support (0.10.0)
172
- eac_ruby_utils (~> 0.120)
173
- rspec (~> 3.12)
174
- rubocop (~> 1.60, >= 1.60.1)
175
- rubocop-rails (~> 2.23, >= 2.23.1)
176
- rubocop-rspec (~> 2.26, >= 2.26.1)
177
- eac_ruby_utils (0.124.0)
178
- activesupport (>= 4, < 7)
179
- addressable (~> 2.8, >= 2.8.7)
180
- bundler
181
- filesize (~> 0.2)
182
- net-ssh (~> 4.2)
183
- eac_templates (0.7.1)
184
- eac_config (~> 0.14, >= 0.14.2)
185
- eac_ruby_utils (~> 0.122)
168
+ eac_ruby_base0 (0.19.2)
169
+ avm-eac_ruby_base1 (~> 0.37)
170
+ eac_cli (~> 0.43)
171
+ eac_fs (~> 0.19)
172
+ eac_ruby_utils (~> 0.128, >= 0.128.2)
173
+ eac_ruby_gem_support (0.12.0)
174
+ eac_ruby_utils (~> 0.127)
175
+ rspec (~> 3.13, >= 3.13.1)
176
+ rubocop (~> 1.76)
177
+ rubocop-rails (~> 2.32)
178
+ rubocop-rspec (~> 3.6)
179
+ super_diff (~> 0.9)
180
+ eac_templates (0.8.1)
181
+ eac_config (~> 0.15)
182
+ eac_ruby_utils (~> 0.127)
183
+ ehbrs_ruby_utils (0.45.0)
184
+ aranha (~> 0.20)
185
+ aranha-parsers (~> 0.26, >= 0.26.1)
186
+ aranha-selenium (~> 0.12)
187
+ avm (~> 0.96, >= 0.96.1)
188
+ avm-eac_rails_base0 (~> 0.11, >= 0.11.1)
189
+ dentaku (~> 3.5, >= 3.5.4)
190
+ eac_fs (~> 0.19)
191
+ eac_rest (~> 0.12)
192
+ eac_ruby_utils (~> 0.128, >= 0.128.2)
193
+ eac_templates (~> 0.8, >= 0.8.1)
194
+ inifile (~> 3.0)
195
+ srt (~> 0.1, >= 0.1.5)
196
+ taglib-ruby (~> 1.1, >= 1.1.3)
197
+ ultimate_lyrics (~> 0.1, >= 0.1.3)
186
198
  faraday (2.8.1)
187
199
  base64
188
200
  faraday-net_http (>= 2.0, < 3.1)
@@ -192,87 +204,87 @@ GEM
192
204
  faraday-gzip (0.1.0)
193
205
  faraday (>= 1.0)
194
206
  zlib (~> 2.1)
195
- faraday-multipart (1.0.4)
196
- multipart-post (~> 2)
207
+ faraday-multipart (1.1.1)
208
+ multipart-post (~> 2.0)
197
209
  faraday-net_http (3.0.2)
198
- faraday-retry (2.2.1)
210
+ faraday-retry (2.3.2)
199
211
  faraday (~> 2.0)
200
212
  filesize (0.2.0)
201
213
  hpricot (0.8.6)
202
214
  htmlbeautifier (1.4.3)
203
- i18n (1.14.6)
215
+ i18n (1.14.7)
204
216
  concurrent-ruby (~> 1.0)
205
217
  ice_nine (0.11.2)
206
218
  inifile (3.0.0)
207
- json (2.9.0)
208
- language_server-protocol (3.17.0.3)
219
+ json (2.12.2)
220
+ language_server-protocol (3.17.0.5)
221
+ lint_roller (1.1.0)
209
222
  minitar (0.12.1)
210
- minitest (5.25.4)
223
+ minitest (5.25.5)
211
224
  multipart-post (2.4.1)
212
225
  net-ssh (4.2.0)
213
226
  nokogiri (1.15.7-x86_64-linux)
214
227
  racc (~> 1.4)
215
228
  ofx-parser (1.1.0)
216
229
  hpricot (>= 0.6)
230
+ optimist (3.2.1)
217
231
  os (1.1.4)
218
- parallel (1.26.3)
219
- parser (3.3.6.0)
232
+ parallel (1.27.0)
233
+ parser (3.3.8.0)
220
234
  ast (~> 2.4.1)
221
235
  racc
222
236
  parslet (2.0.0)
223
237
  pastel (0.8.0)
224
238
  tty-color (~> 0.5)
239
+ patience_diff (1.2.0)
240
+ optimist (~> 3.0)
241
+ prism (1.4.0)
225
242
  public_suffix (5.1.1)
226
243
  racc (1.8.1)
227
- rack (3.1.8)
244
+ rack (3.1.16)
228
245
  rainbow (3.1.1)
229
246
  random-port (0.7.1)
230
- regexp_parser (2.9.3)
231
- rspec (3.13.0)
247
+ regexp_parser (2.10.0)
248
+ rspec (3.13.1)
232
249
  rspec-core (~> 3.13.0)
233
250
  rspec-expectations (~> 3.13.0)
234
251
  rspec-mocks (~> 3.13.0)
235
- rspec-core (3.13.2)
252
+ rspec-core (3.13.5)
236
253
  rspec-support (~> 3.13.0)
237
- rspec-expectations (3.13.3)
254
+ rspec-expectations (3.13.5)
238
255
  diff-lcs (>= 1.2.0, < 2.0)
239
256
  rspec-support (~> 3.13.0)
240
- rspec-mocks (3.13.2)
257
+ rspec-mocks (3.13.5)
241
258
  diff-lcs (>= 1.2.0, < 2.0)
242
259
  rspec-support (~> 3.13.0)
243
- rspec-support (3.13.2)
244
- rubocop (1.69.1)
260
+ rspec-support (3.13.4)
261
+ rubocop (1.77.0)
245
262
  json (~> 2.3)
246
- language_server-protocol (>= 3.17.0)
263
+ language_server-protocol (~> 3.17.0.2)
264
+ lint_roller (~> 1.1.0)
247
265
  parallel (~> 1.10)
248
266
  parser (>= 3.3.0.2)
249
267
  rainbow (>= 2.2.2, < 4.0)
250
268
  regexp_parser (>= 2.9.3, < 3.0)
251
- rubocop-ast (>= 1.36.2, < 2.0)
269
+ rubocop-ast (>= 1.45.1, < 2.0)
252
270
  ruby-progressbar (~> 1.7)
253
271
  unicode-display_width (>= 2.4.0, < 4.0)
254
- rubocop-ast (1.36.2)
255
- parser (>= 3.3.1.0)
256
- rubocop-capybara (2.21.0)
257
- rubocop (~> 1.41)
258
- rubocop-factory_bot (2.26.1)
259
- rubocop (~> 1.61)
260
- rubocop-rails (2.27.0)
272
+ rubocop-ast (1.45.1)
273
+ parser (>= 3.3.7.2)
274
+ prism (~> 1.4)
275
+ rubocop-rails (2.32.0)
261
276
  activesupport (>= 4.2.0)
277
+ lint_roller (~> 1.1)
262
278
  rack (>= 1.1)
263
- rubocop (>= 1.52.0, < 2.0)
264
- rubocop-ast (>= 1.31.1, < 2.0)
265
- rubocop-rspec (2.31.0)
266
- rubocop (~> 1.40)
267
- rubocop-capybara (~> 2.17)
268
- rubocop-factory_bot (~> 2.22)
269
- rubocop-rspec_rails (~> 2.28)
270
- rubocop-rspec_rails (2.29.1)
271
- rubocop (~> 1.61)
279
+ rubocop (>= 1.75.0, < 2.0)
280
+ rubocop-ast (>= 1.44.0, < 2.0)
281
+ rubocop-rspec (3.6.0)
282
+ lint_roller (~> 1.1)
283
+ rubocop (~> 1.72, >= 1.72.1)
272
284
  ruby-filemagic (0.7.3)
273
285
  ruby-progressbar (1.13.0)
274
286
  ruby2_keywords (0.0.5)
275
- rubyzip (2.3.2)
287
+ rubyzip (2.4.1)
276
288
  selenium-webdriver (3.142.7)
277
289
  childprocess (>= 0.5, < 4.0)
278
290
  rubyzip (>= 1.2.2)
@@ -282,6 +294,10 @@ GEM
282
294
  unicode-display_width (>= 1.5, < 3.0)
283
295
  unicode_utils (~> 1.4)
284
296
  strings-ansi (0.2.0)
297
+ super_diff (0.9.0)
298
+ attr_extras (>= 6.2.4)
299
+ diff-lcs
300
+ patience_diff
285
301
  taglib-ruby (1.1.3)
286
302
  telegram-bot-ruby (0.23.0)
287
303
  dry-inflector
@@ -313,10 +329,13 @@ PLATFORMS
313
329
  x86_64-linux
314
330
 
315
331
  DEPENDENCIES
316
- aranha-parsers!
317
- eac_ruby_gem_support (~> 0.10)
332
+ avm-eac_ruby_base1!
333
+ eac_cli!
334
+ eac_envs-http!
335
+ eac_fs!
336
+ eac_ruby_gem_support (~> 0.12)
337
+ eac_ruby_utils!
318
338
  ehbrs-tools!
319
- ehbrs_ruby_utils!
320
339
 
321
340
  BUNDLED WITH
322
341
  2.4.22
data/exe/ehbrs CHANGED
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  $LOAD_PATH.unshift("#{__dir__}/../lib")
5
- require 'ehbrs/tools/runner'
5
+ require 'ehbrs/tools'
6
6
  Ehbrs::Tools::Runner.run
@@ -1,12 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_ruby_base0/application'
4
-
5
3
  module Ehbrs
6
4
  module Tools
7
- class << self
8
- def application
9
- @application ||= ::EacRubyBase0::Application.new(::File.expand_path('../../..', __dir__))
5
+ module Application
6
+ common_concern
7
+
8
+ class_methods do
9
+ def application
10
+ @application ||= ::EacRubyBase0::Application.new(::File.expand_path('../../..', __dir__))
11
+ end
10
12
  end
11
13
  end
12
14
  end
@@ -1,3 +1 @@
1
1
  # frozen_string_literal: true
2
-
3
- require 'eac_ruby_base0/core_ext'
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_ruby_utils/envs'
4
- require 'eac_ruby_utils/simple_cache'
5
-
6
3
  module Ehbrs
7
4
  module Tools
8
5
  module Executables
@@ -12,19 +9,6 @@ module Ehbrs
12
9
  def env
13
10
  ::EacRubyUtils::Envs.local
14
11
  end
15
-
16
- private
17
-
18
- {
19
- '--version' => %w[flips],
20
- '-V' => %w[xdelta3]
21
- }.each do |validate_arg, commands|
22
- commands.each do |command|
23
- define_method("#{command}_uncached") do
24
- env.executable(command, validate_arg)
25
- end
26
- end
27
- end
28
12
  end
29
13
  end
30
14
  end
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Ehbrs
4
+ module Tools
5
+ module Google
6
+ module Translate
7
+ class Session
8
+ START_URL = 'https://translate.google.com.br/#view=home&op=docs&sl=en&tl=pt'
9
+ CLOSE_POPUP_CSS = '.dismiss-button'
10
+ FILE_INPUT_XPATH = '//*[@id = "tlid-file-input"]'
11
+ SUBMIT_XPATH = '//form[@action="//translate.googleusercontent.com/translate_f"]' \
12
+ '//input[@type="submit"]'
13
+ RESULT_XPATHS = [
14
+ '//script[contains(@src, "https://translate.google.com/translate_a")]',
15
+ '/html/body/pre'
16
+ ].freeze
17
+
18
+ attr_reader :sub
19
+
20
+ def initialize
21
+ @sub = ::Aranha::Selenium::Session.new
22
+ end
23
+
24
+ def translate(source_document_path)
25
+ go_to_upload_form
26
+ input_file(source_document_path)
27
+ close_changes_alert_popup
28
+ click_on_translate_button
29
+ wait_for_load_translation
30
+ sub.current_source
31
+ end
32
+
33
+ private
34
+
35
+ def go_to_upload_form
36
+ sub.navigate.to START_URL
37
+ sub.wait_for_element(xpath: FILE_INPUT_XPATH)
38
+ end
39
+
40
+ def input_file(source_document_path)
41
+ sub.find_element(xpath: FILE_INPUT_XPATH).send_keys(source_document_path)
42
+ end
43
+
44
+ def click_on_translate_button
45
+ sub.wait_for_click(xpath: SUBMIT_XPATH)
46
+ end
47
+
48
+ def close_changes_alert_popup
49
+ sub.wait_for_click(css: CLOSE_POPUP_CSS)
50
+ end
51
+
52
+ def wait_for_load_translation
53
+ sub.wait.until do
54
+ RESULT_XPATHS.any? { |xpath| sub.find_elements(xpath: xpath).size.positive? }
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/instances/base'
4
- require 'eac_ruby_utils/core_ext'
5
-
6
3
  module Ehbrs
7
4
  module Tools
8
5
  INSTANCE_ID = 'ehbrs-tools_0'
@@ -0,0 +1,63 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Ehbrs
4
+ module Tools
5
+ module Observers
6
+ class Base
7
+ include ::EacRubyUtils::Listable
8
+
9
+ lists.add_string :blank_value, :add, :ignore, :raise
10
+
11
+ attr_reader :records, :blank_value, :last_check_time
12
+
13
+ common_constructor :options, default: [{}] do
14
+ @records = options[:records] || []
15
+ @blank_value = options[:blank_value].if_present(BLANK_VALUE_ADD) do |v|
16
+ v = v.to_s
17
+ ::Ehbrs::Tools::Observers::Base.lists.blank_value.value_validate!(v)
18
+ v
19
+ end
20
+ end
21
+
22
+ def check(value, date = ::Time.required_zone.now)
23
+ @last_check_time = date
24
+ send("check_with_blank_value_#{blank_value}", value, date)
25
+ end
26
+
27
+ def changing_value?(value)
28
+ records.if_present(true) do
29
+ last_value.if_present(value.present?) { |v| v != value }
30
+ end
31
+ end
32
+
33
+ def last_change_time
34
+ records.last.if_present(&:time)
35
+ end
36
+
37
+ def last_value
38
+ records.last.if_present(&:value)
39
+ end
40
+
41
+ private
42
+
43
+ def check_with_blank_value_add(value, time) # rubocop:disable Naming/PredicateMethod
44
+ return false unless changing_value?(value)
45
+
46
+ records << { value: value, time: time }.to_struct
47
+ true
48
+ end
49
+
50
+ def check_with_blank_value_ignore(value, date) # rubocop:disable Naming/PredicateMethod
51
+ false if value.blank? ? false : check_with_blank_value_add(value, date)
52
+ end
53
+
54
+ def check_with_blank_value_raise(value, date)
55
+ raise(::ArgumentError, "Blank value checked (Value: #{value}, Class: #{value.class})") if
56
+ value.blank?
57
+
58
+ check_with_blank_value_add(value, date)
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end