ehbrs-tools 0.23.0 → 0.25.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. checksums.yaml +4 -4
  2. data/.avm.yml +4 -0
  3. data/.rspec +1 -0
  4. data/.rubocop.yml +39 -0
  5. data/Gemfile.lock +269 -0
  6. data/exe/ehbrs +2 -2
  7. data/lib/ehbrs/tools/runner/cooking_book/build.rb +52 -0
  8. data/lib/ehbrs/tools/runner/cooking_book.rb +32 -0
  9. data/lib/ehbrs/tools/runner/finances/bb_browser.rb +66 -0
  10. data/lib/ehbrs/{runner/videos/series.rb → tools/runner/finances.rb} +4 -4
  11. data/lib/ehbrs/tools/runner/fs/selected.rb +81 -0
  12. data/lib/ehbrs/tools/runner/fs/used_space.rb +161 -0
  13. data/lib/ehbrs/tools/runner/fs.rb +18 -0
  14. data/lib/ehbrs/tools/runner/google/translate.rb +89 -0
  15. data/lib/ehbrs/tools/runner/google.rb +18 -0
  16. data/lib/ehbrs/tools/runner/music/selected.rb +28 -0
  17. data/lib/ehbrs/tools/runner/music.rb +18 -0
  18. data/lib/ehbrs/tools/runner/self/test.rb +27 -0
  19. data/lib/ehbrs/tools/runner/self.rb +18 -0
  20. data/lib/ehbrs/tools/runner/telegram/send_message.rb +31 -0
  21. data/lib/ehbrs/tools/runner/telegram.rb +28 -0
  22. data/lib/ehbrs/tools/runner/vg/ips.rb +134 -0
  23. data/lib/ehbrs/tools/runner/vg/wii.rb +74 -0
  24. data/lib/ehbrs/tools/runner/vg.rb +18 -0
  25. data/lib/ehbrs/tools/runner/videos/extract.rb +70 -0
  26. data/lib/ehbrs/tools/runner/videos/probe.rb +34 -0
  27. data/lib/ehbrs/tools/runner/videos/series/rename.rb +74 -0
  28. data/lib/ehbrs/tools/runner/videos/series.rb +20 -0
  29. data/lib/ehbrs/tools/runner/videos/unsupported.rb +61 -0
  30. data/lib/ehbrs/{runner/web_utils → tools/runner}/videos.rb +3 -3
  31. data/lib/ehbrs/tools/runner/web_utils/videos/download.rb +75 -0
  32. data/lib/ehbrs/tools/runner/web_utils/videos/upload.rb +77 -0
  33. data/lib/ehbrs/tools/runner/web_utils/videos.rb +20 -0
  34. data/lib/ehbrs/tools/runner/web_utils.rb +26 -0
  35. data/lib/ehbrs/tools/runner.rb +21 -0
  36. data/lib/ehbrs/tools/version.rb +1 -1
  37. data/spec/code/rubocop_spec.rb +3 -0
  38. data/spec/lib/ehbrs/cooking_book/recipe/measure_spec.rb +21 -0
  39. data/spec/lib/ehbrs/observers/base_spec.rb +93 -0
  40. data/spec/lib/ehbrs/tools/runner/fs/used_space_spec.rb +61 -0
  41. data/spec/lib/ehbrs/tools/runner/vg/ips_spec.rb +31 -0
  42. data/spec/lib/ehbrs/tools/runner/vg/ips_spec_files/expected.rom +0 -0
  43. data/spec/lib/ehbrs/tools/runner/vg/ips_spec_files/patch_0.ips +0 -0
  44. data/spec/lib/ehbrs/tools/runner/vg/ips_spec_files/patch_1.ips +0 -0
  45. data/spec/lib/ehbrs/tools/runner/vg/ips_spec_files/source.rom +0 -0
  46. data/spec/lib/ehbrs/tools/runner/videos/probe_spec.rb +19 -0
  47. data/spec/lib/ehbrs/tools/runner/videos/probe_spec_files/fixed.target.yaml +105 -0
  48. data/spec/lib/ehbrs/tools/runner/videos/unsupported_spec.rb +75 -0
  49. data/spec/lib/ehbrs/tools/runner/videos/unsupported_spec_files/dts_audio.probe.yaml +90 -0
  50. data/spec/lib/ehbrs/tools/runner_spec.rb +16 -0
  51. data/spec/lib/ehbrs/vg/wii/game_file_spec.rb +21 -0
  52. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec.rb +11 -0
  53. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/pikmin2_R92P01_wia.source.witdump +27 -0
  54. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/pikmin2_R92P01_wia.target.yaml +22 -0
  55. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/pikmin2_pal_iso.source.witdump +28 -0
  56. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/pikmin2_pal_iso.target.yaml +21 -0
  57. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/resident_evil_code_veronica_disc2_iso.source.witdump +16 -0
  58. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/resident_evil_code_veronica_disc2_iso.target.yaml +19 -0
  59. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/super_mario_galaxy_wbfs.source.witdump +28 -0
  60. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/super_mario_galaxy_wbfs.target.yaml +23 -0
  61. data/spec/lib/ehbrs/vg/wii/wit/path_spec.rb +33 -0
  62. data/spec/spec_helper/videos.rb +30 -0
  63. data/spec/spec_helper/videos_files/stub_source.mp4 +0 -0
  64. data/spec/spec_helper.rb +7 -0
  65. data/vendor/aranha-parsers/aranha-parsers.gemspec +2 -2
  66. data/vendor/aranha-parsers/lib/aranha/parsers/rspec/setup.rb +15 -0
  67. data/vendor/aranha-parsers/lib/aranha/parsers/{spec → rspec}/source_target_fixtures_example.rb +0 -0
  68. data/vendor/aranha-parsers/lib/aranha/parsers/rspec.rb +11 -0
  69. data/vendor/aranha-parsers/lib/aranha/parsers/source_address.rb +10 -8
  70. data/vendor/aranha-parsers/lib/aranha/parsers/version.rb +1 -1
  71. data/vendor/aranha-parsers/spec/lib/rubocop_check_spec.rb +1 -1
  72. data/vendor/aranha-parsers/spec/spec_helper.rb +2 -9
  73. data/vendor/aranha-selenium/aranha-selenium.gemspec +2 -2
  74. data/vendor/aranha-selenium/lib/aranha/selenium/version.rb +1 -1
  75. data/vendor/aranha-selenium/spec/rubocop_check_spec.rb +1 -5
  76. data/vendor/aranha-selenium/spec/spec_helper.rb +2 -98
  77. data/vendor/eac_cli/eac_cli.gemspec +3 -3
  78. data/vendor/eac_cli/lib/eac_cli/config/entry.rb +0 -2
  79. data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
  80. data/vendor/eac_cli/spec/rubocop_spec.rb +1 -1
  81. data/vendor/eac_cli/spec/spec_helper.rb +2 -101
  82. data/vendor/eac_config/eac_config.gemspec +2 -2
  83. data/vendor/eac_config/lib/eac_config/version.rb +1 -1
  84. data/vendor/eac_config/spec/rubocop_spec.rb +1 -1
  85. data/vendor/eac_config/spec/spec_helper.rb +2 -15
  86. data/vendor/eac_docker/eac_docker.gemspec +2 -2
  87. data/vendor/eac_docker/lib/eac_docker/container.rb +7 -3
  88. data/vendor/eac_docker/lib/eac_docker/debug.rb +15 -0
  89. data/vendor/eac_docker/lib/eac_docker/images/coded.rb +4 -0
  90. data/vendor/eac_docker/lib/eac_docker/images/templatized.rb +16 -2
  91. data/vendor/eac_docker/lib/eac_docker/rspec/setup.rb +17 -0
  92. data/vendor/eac_docker/lib/eac_docker/rspec.rb +2 -10
  93. data/vendor/eac_docker/lib/eac_docker/version.rb +1 -1
  94. data/vendor/eac_docker/spec/rubocop_spec.rb +1 -1
  95. data/vendor/eac_docker/spec/spec_helper.rb +2 -104
  96. data/vendor/eac_ruby_base0/eac_ruby_base0.gemspec +4 -4
  97. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
  98. data/vendor/eac_ruby_base0/spec/rubocop_spec.rb +1 -1
  99. data/vendor/eac_ruby_base0/spec/spec_helper.rb +2 -101
  100. data/vendor/eac_ruby_utils/eac_ruby_utils.gemspec +1 -1
  101. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/boolean.rb +1 -1
  102. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/executable.rb +15 -3
  103. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/gems_registry/gem.rb +75 -0
  104. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/gems_registry.rb +35 -0
  105. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/recursive_builder.rb +51 -0
  106. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/default_setup.rb +20 -0
  107. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup/conditionals.rb +17 -0
  108. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup.rb +12 -0
  109. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup_manager.rb +49 -0
  110. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  111. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/recursive_builder_spec.rb +65 -0
  112. data/vendor/eac_ruby_utils/spec/rubocop_check_spec.rb +1 -1
  113. data/vendor/eac_ruby_utils/spec/spec_helper.rb +6 -6
  114. data/vendor/ehbrs_ruby_utils/ehbrs_ruby_utils.gemspec +6 -3
  115. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/finances/bb_browser/docker_image.rb +18 -0
  116. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/patches/object/template.rb +6 -0
  117. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/version.rb +1 -1
  118. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/stream.rb +11 -1
  119. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/web_utils/videos/file/rename.rb +28 -0
  120. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/web_utils/videos/file.rb +11 -8
  121. data/vendor/ehbrs_ruby_utils/spec/lib/ehbrs_ruby_utils/videos/stream_spec.rb +13 -0
  122. data/vendor/ehbrs_ruby_utils/spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_attachment.source.yaml +28 -0
  123. data/vendor/ehbrs_ruby_utils/spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_attachment.target.yaml +7 -0
  124. data/vendor/ehbrs_ruby_utils/spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_audio.source.yaml +49 -0
  125. data/vendor/ehbrs_ruby_utils/spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_audio.target.yaml +7 -0
  126. data/vendor/ehbrs_ruby_utils/spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_subtitle.source.yaml +43 -0
  127. data/vendor/ehbrs_ruby_utils/spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_subtitle.target.yaml +7 -0
  128. data/vendor/ehbrs_ruby_utils/spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_video.source.yaml +59 -0
  129. data/vendor/ehbrs_ruby_utils/spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_video.target.yaml +7 -0
  130. data/vendor/ehbrs_ruby_utils/spec/rubocop_check_spec.rb +1 -5
  131. data/vendor/ehbrs_ruby_utils/spec/spec_helper.rb +2 -98
  132. data/vendor/ehbrs_ruby_utils/template/ehbrs_ruby_utils/finances/bb_browser/docker_image/Dockerfile +44 -0
  133. data/vendor/ehbrs_ruby_utils/template/ehbrs_ruby_utils/finances/bb_browser/docker_image/Makefile +35 -0
  134. data/vendor/ehbrs_ruby_utils/template/ehbrs_ruby_utils/finances/bb_browser/docker_image/README.md +16 -0
  135. data/vendor/ehbrs_ruby_utils/template/ehbrs_ruby_utils/finances/bb_browser/docker_image/context/firefox.service +8 -0
  136. data/vendor/ehbrs_ruby_utils/template/ehbrs_ruby_utils/finances/bb_browser/docker_image/context/startbrowser.sh +9 -0
  137. metadata +149 -40
  138. data/lib/ehbrs/runner/cooking_book/build.rb +0 -50
  139. data/lib/ehbrs/runner/cooking_book.rb +0 -30
  140. data/lib/ehbrs/runner/finances/bb_browser.rb +0 -35
  141. data/lib/ehbrs/runner/finances.rb +0 -16
  142. data/lib/ehbrs/runner/fs/selected.rb +0 -79
  143. data/lib/ehbrs/runner/fs/used_space.rb +0 -159
  144. data/lib/ehbrs/runner/fs.rb +0 -16
  145. data/lib/ehbrs/runner/google/translate.rb +0 -87
  146. data/lib/ehbrs/runner/google.rb +0 -16
  147. data/lib/ehbrs/runner/music/selected.rb +0 -26
  148. data/lib/ehbrs/runner/music.rb +0 -16
  149. data/lib/ehbrs/runner/self/test.rb +0 -25
  150. data/lib/ehbrs/runner/self.rb +0 -16
  151. data/lib/ehbrs/runner/telegram/send_message.rb +0 -29
  152. data/lib/ehbrs/runner/telegram.rb +0 -26
  153. data/lib/ehbrs/runner/vg/ips.rb +0 -132
  154. data/lib/ehbrs/runner/vg/wii.rb +0 -72
  155. data/lib/ehbrs/runner/vg.rb +0 -16
  156. data/lib/ehbrs/runner/videos/extract.rb +0 -68
  157. data/lib/ehbrs/runner/videos/probe.rb +0 -32
  158. data/lib/ehbrs/runner/videos/series/rename.rb +0 -72
  159. data/lib/ehbrs/runner/videos/unsupported.rb +0 -59
  160. data/lib/ehbrs/runner/videos.rb +0 -16
  161. data/lib/ehbrs/runner/web_utils/videos/download.rb +0 -63
  162. data/lib/ehbrs/runner/web_utils/videos/upload.rb +0 -75
  163. data/lib/ehbrs/runner/web_utils.rb +0 -24
  164. data/lib/ehbrs/runner.rb +0 -19
  165. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/conditional.rb +0 -35
  166. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/stubbed_ssh.rb +0 -44
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24cc95cbb19d48d47c3cf2447d31a2666e5bff47ba87e6e2b0943203f9324cd6
4
- data.tar.gz: 6d95e2625e2ed87691d8ecd13118a7da6c7108bb7a0e4fe900ffc96d7b6d2a51
3
+ metadata.gz: cd84e165d6c571aba1ae27995dd9a975089005db9590f6fadb5fccc9fbbc8525
4
+ data.tar.gz: 10c2d2ca5902c1e5952f56d8400a176c898f40519675dd740ecc20f9fe8f5197
5
5
  SHA512:
6
- metadata.gz: ce667b62bb9d70459867f6033acb75086631f8e264e5d1099ecb22d0f96e625239b7c98d660d47fe429b8ebfb9fe7c4210549a2726074ff0f0e4c8765946add8
7
- data.tar.gz: 71a83d8127ae744dfd57c84061911280eeffba34170c484f90bfbdc0b44a6b16a4b200d762e5c573391e6e027e1c35a573a1186f34c357a004a6a95fc859b7dc
6
+ metadata.gz: 8c41cea11d8cf3f1a531b84efae67be1604bc4127323280bb6da2111b546f4580fa6856d330707588d610130d0d76454990c7acf3918d769d06271ad0fe9a412
7
+ data.tar.gz: 961078668e064e54dc30c3e93c53fe82bbfe4ef8b1a7c927f63381a12e56e880ef695948c7174c9fd7889c3f2d0df7c7b25c2f4edb75a94e9968e6dd87386d87
data/.avm.yml ADDED
@@ -0,0 +1,4 @@
1
+ ---
2
+ locale: pt-BR
3
+ test:
4
+ bundle_command: exec ehbrs self test
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --require spec/spec_helper --color --format doc --default-path . --pattern 'spec/**/*_spec.rb'
data/.rubocop.yml ADDED
@@ -0,0 +1,39 @@
1
+ require:
2
+ - rubocop-rails
3
+ - rubocop-rspec
4
+
5
+ AllCops:
6
+ Exclude:
7
+ - vendor/**/*
8
+
9
+ Layout/LineLength:
10
+ Max: 100
11
+
12
+ Metrics/BlockLength:
13
+ Exclude:
14
+ - spec/**/*_spec.rb
15
+
16
+ Rails/Output:
17
+ Enabled: false
18
+
19
+ Rails/TimeZone:
20
+ Enabled: false
21
+
22
+ RSpec/NestedGroups:
23
+ Exclude:
24
+ - spec/**/*_spec.rb
25
+
26
+ Style/AsciiComments:
27
+ Enabled: false
28
+
29
+ Style/Documentation:
30
+ Enabled: false
31
+
32
+ Style/HashEachMethods:
33
+ Enabled: true
34
+
35
+ Style/HashTransformKeys:
36
+ Enabled: true
37
+
38
+ Style/HashTransformValues:
39
+ Enabled: true
data/Gemfile.lock ADDED
@@ -0,0 +1,269 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ ehbrs-tools (0.25.1)
5
+ avm-tools (~> 0.82, >= 0.82.1)
6
+ eac_cli (~> 0.12, >= 0.12.5)
7
+ eac_ruby_utils (~> 0.71)
8
+ ehbrs_ruby_utils (~> 0.8.1, ~> 0.8)
9
+ filesize
10
+ inifile (~> 3.0)
11
+ os
12
+ telegram-bot-ruby
13
+
14
+ PATH
15
+ remote: vendor/aranha-parsers
16
+ specs:
17
+ aranha-parsers (0.8.3)
18
+ activesupport (>= 4.0.0)
19
+ addressable (~> 2.7)
20
+ curb (~> 0.9.10)
21
+ eac_ruby_utils (~> 0.74)
22
+ httpclient (~> 2.8, >= 2.8.3)
23
+ ofx-parser (~> 1.1.0)
24
+
25
+ PATH
26
+ remote: vendor/aranha-selenium
27
+ specs:
28
+ aranha-selenium (0.2.2)
29
+ eac_ruby_utils (~> 0.70)
30
+ selenium-webdriver (~> 3.142, >= 3.142.3)
31
+
32
+ PATH
33
+ remote: vendor/eac_cli
34
+ specs:
35
+ eac_cli (0.22.2)
36
+ colorize (~> 0.8.1)
37
+ eac_config (~> 0.5, >= 0.5.1)
38
+ eac_ruby_utils (~> 0.70)
39
+
40
+ PATH
41
+ remote: vendor/eac_config
42
+ specs:
43
+ eac_config (0.5.1)
44
+ addressable
45
+ eac_ruby_utils (~> 0.70)
46
+
47
+ PATH
48
+ remote: vendor/eac_docker
49
+ specs:
50
+ eac_docker (0.4.1)
51
+ eac_ruby_utils (~> 0.74)
52
+ eac_templates (~> 0.1)
53
+
54
+ PATH
55
+ remote: vendor/eac_ruby_base0
56
+ specs:
57
+ eac_ruby_base0 (0.10.1)
58
+ eac_cli (~> 0.22, >= 0.22.2)
59
+ eac_ruby_gems_utils (~> 0.9.5, ~> 0.9)
60
+ eac_ruby_utils (~> 0.70)
61
+
62
+ PATH
63
+ remote: vendor/eac_ruby_utils
64
+ specs:
65
+ eac_ruby_utils (0.74.0)
66
+ activesupport (>= 4.0)
67
+ addressable (~> 2.6)
68
+ filesize
69
+ net-ssh (~> 4.2)
70
+
71
+ PATH
72
+ remote: vendor/ehbrs_ruby_utils
73
+ specs:
74
+ ehbrs_ruby_utils (0.8.1)
75
+ eac_ruby_utils (~> 0.70)
76
+ eac_templates (~> 0.1, >= 0.1.1)
77
+
78
+ GEM
79
+ remote: https://rubygems.org/
80
+ specs:
81
+ activesupport (6.1.4.1)
82
+ concurrent-ruby (~> 1.0, >= 1.0.2)
83
+ i18n (>= 1.6, < 2)
84
+ minitest (>= 5.1)
85
+ tzinfo (~> 2.0)
86
+ zeitwerk (~> 2.3)
87
+ addressable (2.8.0)
88
+ public_suffix (>= 2.0.2, < 5.0)
89
+ asciidoctor (2.0.16)
90
+ ast (2.4.2)
91
+ avm (0.3.0)
92
+ eac_docker (~> 0.3)
93
+ eac_git (~> 0.6)
94
+ eac_ruby_utils (~> 0.68)
95
+ eac_templates (~> 0.1, >= 0.1.1)
96
+ avm-apps (0.4.0)
97
+ eac_ruby_utils (~> 0.67)
98
+ avm-eac_asciidoctor_base0 (0.3.0)
99
+ asciidoctor (~> 2.0, >= 2.0.12)
100
+ avm-eac_webapp_base0 (~> 0.1)
101
+ eac_ruby_utils (~> 0.63)
102
+ os
103
+ rouge (~> 3.26)
104
+ avm-eac_webapp_base0 (0.1.0)
105
+ avm (~> 0.1)
106
+ eac_ruby_utils (~> 0.68)
107
+ avm-tools (0.104.0)
108
+ aranha-parsers (~> 0.4)
109
+ asciidoctor (~> 2.0, >= 2.0.12)
110
+ avm (~> 0.1)
111
+ avm-apps (~> 0.2)
112
+ avm-eac_asciidoctor_base0
113
+ clipboard (~> 1.3, >= 1.3.3)
114
+ content-type (~> 0.0.1)
115
+ curb (~> 0.9.10)
116
+ eac_docker (~> 0.2)
117
+ eac_git (~> 0.2)
118
+ eac_ruby_base0 (~> 0.7, >= 0.7.2)
119
+ eac_ruby_gems_utils (~> 0.6, >= 0.6.1)
120
+ eac_templates (~> 0.1)
121
+ filesize
122
+ git (~> 1.7)
123
+ htmlbeautifier (~> 1.3, >= 1.3.1)
124
+ minitar
125
+ os
126
+ ruby-progressbar (~> 1.10, >= 1.10.1)
127
+ axiom-types (0.1.1)
128
+ descendants_tracker (~> 0.0.4)
129
+ ice_nine (~> 0.11.0)
130
+ thread_safe (~> 0.3, >= 0.3.1)
131
+ childprocess (3.0.0)
132
+ clipboard (1.3.6)
133
+ coercible (1.0.0)
134
+ descendants_tracker (~> 0.0.1)
135
+ colorize (0.8.1)
136
+ concurrent-ruby (1.1.9)
137
+ content-type (0.0.1)
138
+ parslet (~> 1.5)
139
+ curb (0.9.11)
140
+ descendants_tracker (0.0.4)
141
+ thread_safe (~> 0.3, >= 0.3.1)
142
+ diff-lcs (1.4.4)
143
+ dry-inflector (0.2.1)
144
+ eac_git (0.7.3)
145
+ eac_ruby_utils (~> 0.74)
146
+ parseconfig (~> 1.0, >= 1.0.8)
147
+ eac_ruby_gem_support (0.4.0)
148
+ eac_ruby_utils (~> 0.74)
149
+ rspec (~> 3.9)
150
+ rubocop (~> 0.80.1)
151
+ rubocop-rails (~> 2.4.2)
152
+ rubocop-rspec (~> 1.38.1)
153
+ eac_ruby_gems_utils (0.9.5)
154
+ bundler (~> 2.2, >= 2.2.17)
155
+ eac_ruby_utils (~> 0.70)
156
+ eac_templates (0.1.1)
157
+ eac_config (~> 0.5)
158
+ eac_ruby_utils (~> 0.64)
159
+ faraday (1.7.0)
160
+ faraday-em_http (~> 1.0)
161
+ faraday-em_synchrony (~> 1.0)
162
+ faraday-excon (~> 1.1)
163
+ faraday-httpclient (~> 1.0.1)
164
+ faraday-net_http (~> 1.0)
165
+ faraday-net_http_persistent (~> 1.1)
166
+ faraday-patron (~> 1.0)
167
+ faraday-rack (~> 1.0)
168
+ multipart-post (>= 1.2, < 3)
169
+ ruby2_keywords (>= 0.0.4)
170
+ faraday-em_http (1.0.0)
171
+ faraday-em_synchrony (1.0.0)
172
+ faraday-excon (1.1.0)
173
+ faraday-httpclient (1.0.1)
174
+ faraday-net_http (1.0.1)
175
+ faraday-net_http_persistent (1.2.0)
176
+ faraday-patron (1.0.0)
177
+ faraday-rack (1.0.0)
178
+ filesize (0.2.0)
179
+ git (1.9.1)
180
+ rchardet (~> 1.8)
181
+ hpricot (0.8.6)
182
+ htmlbeautifier (1.3.1)
183
+ httpclient (2.8.3)
184
+ i18n (1.8.10)
185
+ concurrent-ruby (~> 1.0)
186
+ ice_nine (0.11.2)
187
+ inifile (3.0.0)
188
+ jaro_winkler (1.5.4)
189
+ minitar (0.9)
190
+ minitest (5.14.4)
191
+ multipart-post (2.1.1)
192
+ net-ssh (4.2.0)
193
+ ofx-parser (1.1.0)
194
+ hpricot (>= 0.6)
195
+ os (1.1.1)
196
+ parallel (1.20.1)
197
+ parseconfig (1.1.0)
198
+ parser (3.0.2.0)
199
+ ast (~> 2.4.1)
200
+ parslet (1.8.2)
201
+ public_suffix (4.0.6)
202
+ rack (2.2.3)
203
+ rainbow (3.0.0)
204
+ rchardet (1.8.0)
205
+ rexml (3.2.5)
206
+ rouge (3.26.0)
207
+ rspec (3.10.0)
208
+ rspec-core (~> 3.10.0)
209
+ rspec-expectations (~> 3.10.0)
210
+ rspec-mocks (~> 3.10.0)
211
+ rspec-core (3.10.1)
212
+ rspec-support (~> 3.10.0)
213
+ rspec-expectations (3.10.1)
214
+ diff-lcs (>= 1.2.0, < 2.0)
215
+ rspec-support (~> 3.10.0)
216
+ rspec-mocks (3.10.2)
217
+ diff-lcs (>= 1.2.0, < 2.0)
218
+ rspec-support (~> 3.10.0)
219
+ rspec-support (3.10.2)
220
+ rubocop (0.80.1)
221
+ jaro_winkler (~> 1.5.1)
222
+ parallel (~> 1.10)
223
+ parser (>= 2.7.0.1)
224
+ rainbow (>= 2.2.2, < 4.0)
225
+ rexml
226
+ ruby-progressbar (~> 1.7)
227
+ unicode-display_width (>= 1.4.0, < 1.7)
228
+ rubocop-rails (2.4.2)
229
+ rack (>= 1.1)
230
+ rubocop (>= 0.72.0)
231
+ rubocop-rspec (1.38.1)
232
+ rubocop (>= 0.68.1)
233
+ ruby-progressbar (1.11.0)
234
+ ruby2_keywords (0.0.5)
235
+ rubyzip (2.3.2)
236
+ selenium-webdriver (3.142.7)
237
+ childprocess (>= 0.5, < 4.0)
238
+ rubyzip (>= 1.2.2)
239
+ telegram-bot-ruby (0.16.0)
240
+ dry-inflector
241
+ faraday
242
+ virtus (~> 2.0)
243
+ thread_safe (0.3.6)
244
+ tzinfo (2.0.4)
245
+ concurrent-ruby (~> 1.0)
246
+ unicode-display_width (1.6.1)
247
+ virtus (2.0.0)
248
+ axiom-types (~> 0.1)
249
+ coercible (~> 1.0)
250
+ descendants_tracker (~> 0.0, >= 0.0.3)
251
+ zeitwerk (2.4.2)
252
+
253
+ PLATFORMS
254
+ x86_64-linux
255
+
256
+ DEPENDENCIES
257
+ aranha-parsers!
258
+ aranha-selenium!
259
+ eac_cli!
260
+ eac_config!
261
+ eac_docker!
262
+ eac_ruby_base0!
263
+ eac_ruby_gem_support (~> 0.3)
264
+ eac_ruby_utils!
265
+ ehbrs-tools!
266
+ ehbrs_ruby_utils!
267
+
268
+ BUNDLED WITH
269
+ 2.2.25
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/runner'
6
- ::Ehbrs::Runner.run
5
+ require 'ehbrs/tools/runner'
6
+ ::Ehbrs::Tools::Runner.run
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_cli/core_ext'
4
+ require 'ehbrs/cooking_book/build'
5
+ require 'os'
6
+
7
+ module Ehbrs
8
+ module Tools
9
+ class Runner
10
+ class CookingBook
11
+ class Build
12
+ runner_with :help, :subcommands do
13
+ desc 'Operações para livros de receitas.'
14
+ arg_opt '-d', '--target-dir', 'Caminho para o diretório destino da construção.'
15
+ bool_opt '--open', 'Show the result.'
16
+ end
17
+
18
+ def run
19
+ start_banner
20
+ build.run
21
+ open
22
+ success 'Done'
23
+ end
24
+
25
+ private
26
+
27
+ def build_uncached
28
+ ::Ehbrs::CookingBook::Build.new(
29
+ runner_context.call(:project), target_dir: parsed.target_dir
30
+ )
31
+ end
32
+
33
+ def open
34
+ return unless parsed.open?
35
+
36
+ infom "Opening \"#{open_path}\"..."
37
+ ::EacRubyUtils::Envs.local.command(OS.open_file_command, open_path).system!
38
+ end
39
+
40
+ def open_path
41
+ build.index_page.target_path
42
+ end
43
+
44
+ def start_banner
45
+ infov 'Project', build.project
46
+ infov 'Target directory', build.target_dir
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_cli/core_ext'
4
+ require 'ehbrs/cooking_book/project'
5
+
6
+ module Ehbrs
7
+ module Tools
8
+ class Runner
9
+ class CookingBook
10
+ require_sub __FILE__
11
+
12
+ DEFAULT_SOURCE_DIR = '.'
13
+
14
+ runner_with :help, :subcommands do
15
+ desc 'Operações para livros de receitas.'
16
+ arg_opt '-C', '--source-dir', 'Caminho para o diretório do código-fonte.'
17
+ subcommands
18
+ end
19
+
20
+ private
21
+
22
+ def source_dir_uncached
23
+ (parsed.source_dir || DEFAULT_SOURCE_DIR).to_pathname.expand_path
24
+ end
25
+
26
+ def project_uncached
27
+ ::Ehbrs::CookingBook::Project.new(source_dir)
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,66 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'ehbrs/core_ext'
4
+ require 'ehbrs_ruby_utils/finances/bb_browser/docker_image'
5
+
6
+ module Ehbrs
7
+ module Tools
8
+ class Runner
9
+ class Finances
10
+ class BbBrowser
11
+ runner_with :help do
12
+ desc 'Bankline para Banco do Brasil com módulo de segurança.'
13
+ end
14
+
15
+ def run
16
+ infov 'Docker run arguments', ::Shellwords.join(docker_container.run_command_args)
17
+ infov 'System result', docker_container.run_command.system
18
+ end
19
+
20
+ private
21
+
22
+ def docker_image_uncached
23
+ ::EhbrsRubyUtils::Finances::BbBrowser::DockerImage.create
24
+ end
25
+
26
+ def docker_container_uncached
27
+ r = docker_image.container
28
+ .temporary(true).interactive(true).tty(true)
29
+ .command_arg('seg.bb.com.br')
30
+ %w[capabilities environment_variables volumes].inject(r) do |a, e|
31
+ send("docker_container_#{e}", a)
32
+ end
33
+ end
34
+
35
+ def docker_container_capabilities(container)
36
+ %w[CAP_AUDIT_WRITE CAP_SYS_PTRACE].inject(container) { |a, e| a.capability(e) }
37
+ end
38
+
39
+ def docker_container_environment_variables(container)
40
+ {
41
+ 'USER_UID' => user_id,
42
+ 'USER_GID' => group_id
43
+ }.inject(container) { |a, e| a.env(e[0], e[1]) }
44
+ end
45
+
46
+ def docker_container_volumes(container)
47
+ {
48
+ ::File.join(ENV.fetch('HOME'), 'Downloads') => '/home/user/Downloads',
49
+ ::File.join(ENV.fetch('HOME'), '.Xauthority') => '/home/user/.Xauthority:ro',
50
+ '/tmp/.X11-unix' => '/tmp/.X11-unix:ro',
51
+ '/etc/machine-id' => '/etc/machine-id:ro'
52
+ }.inject(container) { |a, e| a.volume(e[0], e[1]) }
53
+ end
54
+
55
+ def user_id
56
+ ::EacRubyUtils::Envs.local.command('id', '-u').execute!.strip
57
+ end
58
+
59
+ def group_id
60
+ ::EacRubyUtils::Envs.local.command('id', '-g').execute!.strip
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end