ehbrs-tools 0.17.0 → 0.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (244) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ehbrs/cooking_book/project.rb +8 -2
  3. data/lib/ehbrs/core_ext.rb +4 -0
  4. data/lib/ehbrs/music.rb +9 -0
  5. data/lib/ehbrs/music/album.rb +44 -0
  6. data/lib/ehbrs/observers/base.rb +1 -1
  7. data/lib/ehbrs/observers/with_persistence.rb +1 -1
  8. data/lib/ehbrs/patches.rb +4 -0
  9. data/lib/ehbrs/patches/object/template.rb +2 -2
  10. data/lib/ehbrs/runner/cooking_book/build.rb +20 -2
  11. data/lib/ehbrs/runner/fs/selected.rb +79 -0
  12. data/lib/ehbrs/runner/fs/used_space.rb +2 -3
  13. data/lib/ehbrs/runner/music.rb +16 -0
  14. data/lib/ehbrs/runner/music/selected.rb +26 -0
  15. data/lib/ehbrs/runner/telegram.rb +26 -0
  16. data/lib/ehbrs/runner/telegram/send_message.rb +29 -0
  17. data/lib/ehbrs/runner/videos/probe.rb +2 -2
  18. data/lib/ehbrs/runner/videos/unsupported.rb +1 -1
  19. data/lib/ehbrs/runner/web_utils/videos/upload.rb +1 -1
  20. data/lib/ehbrs/telegram.rb +9 -0
  21. data/lib/ehbrs/telegram/message_sending.rb +32 -0
  22. data/lib/ehbrs/tools/instance.rb +16 -0
  23. data/lib/ehbrs/tools/version.rb +1 -1
  24. data/lib/ehbrs/videos/convert_job.rb +1 -1
  25. data/lib/ehbrs/videos/series/rename/line_result.rb +1 -1
  26. data/lib/ehbrs/videos/unsupported/check_support.rb +13 -8
  27. data/lib/ehbrs/videos/unsupported/fixes/supported_codec.rb +1 -1
  28. data/lib/ehbrs/videos/unsupported/profiles/aoc.rb +27 -0
  29. data/lib/ehbrs/videos/unsupported/search.rb +1 -1
  30. data/lib/ehbrs/videos/unsupported/track.rb +1 -1
  31. data/vendor/aranha-selenium/lib/aranha/selenium/driver_factory/base.rb +8 -0
  32. data/vendor/aranha-selenium/lib/aranha/selenium/driver_factory/chrome.rb +10 -5
  33. data/vendor/aranha-selenium/lib/aranha/selenium/driver_factory/firefox.rb +25 -11
  34. data/vendor/aranha-selenium/lib/aranha/selenium/version.rb +1 -1
  35. data/vendor/avm-apps/Gemfile +5 -0
  36. data/vendor/avm-apps/avm-apps.gemspec +18 -0
  37. data/vendor/avm-apps/lib/avm/apps.rb +9 -0
  38. data/vendor/avm-apps/lib/avm/apps/config.rb +19 -0
  39. data/vendor/avm-apps/lib/avm/apps/jobs.rb +11 -0
  40. data/vendor/avm-apps/lib/avm/apps/jobs/base.rb +64 -0
  41. data/vendor/avm-apps/lib/avm/apps/jobs/variables_source.rb +24 -0
  42. data/vendor/avm-apps/lib/avm/apps/sources/configuration.rb +57 -0
  43. data/vendor/avm-apps/lib/avm/apps/sources/configuration/_locale.rb +18 -0
  44. data/vendor/avm-apps/lib/avm/apps/sources/configuration/_rubocop.rb +26 -0
  45. data/vendor/avm-apps/lib/avm/apps/sources/configuration/_tests.rb +29 -0
  46. data/vendor/avm-apps/lib/avm/apps/version.rb +7 -0
  47. data/vendor/avm-apps/spec/rubocop_spec.rb +3 -0
  48. data/vendor/avm-apps/spec/spec_helper.rb +103 -0
  49. data/vendor/eac_cli/eac_cli.gemspec +4 -2
  50. data/vendor/eac_cli/lib/eac_cli/config.rb +16 -0
  51. data/vendor/eac_cli/lib/eac_cli/config/entry.rb +48 -0
  52. data/vendor/{eac_ruby_utils/lib/eac_ruby_utils/console/configs/read_entry_options.rb → eac_cli/lib/eac_cli/config/entry/options.rb} +20 -9
  53. data/vendor/eac_cli/lib/eac_cli/config/entry/undefined.rb +26 -0
  54. data/vendor/eac_cli/lib/eac_cli/core_ext.rb +2 -0
  55. data/vendor/eac_cli/lib/eac_cli/default_runner.rb +1 -1
  56. data/vendor/eac_cli/lib/eac_cli/definition/alternative.rb +4 -7
  57. data/vendor/eac_cli/lib/eac_cli/definition/argument_option.rb +8 -0
  58. data/vendor/eac_cli/lib/eac_cli/definition/base_option.rb +26 -10
  59. data/vendor/eac_cli/lib/eac_cli/definition/base_option/initialize_args_parser.rb +47 -0
  60. data/vendor/eac_cli/lib/eac_cli/definition/boolean_option.rb +8 -0
  61. data/vendor/eac_cli/lib/eac_cli/definition/help_formatter.rb +3 -2
  62. data/vendor/eac_cli/lib/eac_cli/definition/positional_argument.rb +18 -1
  63. data/vendor/eac_cli/lib/eac_cli/old_configs.rb +35 -0
  64. data/vendor/eac_cli/lib/eac_cli/old_configs/entry_reader.rb +80 -0
  65. data/vendor/eac_cli/lib/eac_cli/old_configs/password_entry_reader.rb +16 -0
  66. data/vendor/eac_cli/lib/eac_cli/old_configs/read_entry_options.rb +44 -0
  67. data/vendor/eac_cli/lib/eac_cli/old_configs/store_passwords_entry_reader.rb +25 -0
  68. data/vendor/eac_cli/lib/eac_cli/old_configs_bridge.rb +39 -0
  69. data/vendor/eac_cli/lib/eac_cli/parser/alternative.rb +4 -4
  70. data/vendor/eac_cli/lib/eac_cli/parser/alternative/long_options.rb +37 -0
  71. data/vendor/eac_cli/lib/eac_cli/parser/alternative/option_argument.rb +29 -0
  72. data/vendor/eac_cli/lib/eac_cli/parser/alternative/options.rb +7 -36
  73. data/vendor/eac_cli/lib/eac_cli/parser/alternative/short_options.rb +47 -0
  74. data/vendor/eac_cli/lib/eac_cli/parser/collector.rb +3 -17
  75. data/vendor/eac_cli/lib/eac_cli/patches/object/runner_with.rb +3 -2
  76. data/vendor/eac_cli/lib/eac_cli/runner.rb +0 -50
  77. data/vendor/eac_cli/lib/eac_cli/runner/after_class_methods.rb +46 -0
  78. data/vendor/eac_cli/lib/eac_cli/runner/context.rb +2 -1
  79. data/vendor/eac_cli/lib/eac_cli/runner/instance_methods.rb +42 -0
  80. data/vendor/eac_cli/lib/eac_cli/runner_with/help.rb +9 -4
  81. data/vendor/eac_cli/lib/eac_cli/runner_with/help/builder.rb +73 -0
  82. data/vendor/eac_cli/lib/eac_cli/runner_with/help/builder/alternative.rb +56 -0
  83. data/vendor/eac_cli/lib/eac_cli/runner_with/subcommands.rb +22 -4
  84. data/vendor/eac_cli/lib/eac_cli/runner_with/subcommands/definition_concern.rb +10 -0
  85. data/vendor/eac_cli/lib/eac_cli/runner_with_set.rb +50 -0
  86. data/vendor/eac_cli/lib/eac_cli/speaker.rb +127 -0
  87. data/vendor/eac_cli/lib/eac_cli/speaker/_constants.rb +12 -0
  88. data/vendor/eac_cli/lib/eac_cli/speaker/list.rb +61 -0
  89. data/vendor/eac_cli/lib/eac_cli/speaker/options.rb +38 -0
  90. data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
  91. data/vendor/eac_cli/spec/lib/eac_cli/definition/alternative_spec.rb +4 -0
  92. data/vendor/{eac_ruby_utils/spec/lib/eac_ruby_utils/console/configs_spec.rb → eac_cli/spec/lib/eac_cli/old_configs_spec.rb} +2 -2
  93. data/vendor/eac_cli/spec/lib/eac_cli/parser/alternative_spec.rb +1 -1
  94. data/vendor/eac_cli/spec/lib/eac_cli/runner_spec.rb +43 -5
  95. data/vendor/{eac_ruby_utils/spec/lib/eac_ruby_utils/console → eac_cli/spec/lib/eac_cli}/speaker_spec.rb +7 -11
  96. data/vendor/eac_cli/spec/rubocop_spec.rb +1 -5
  97. data/vendor/eac_cli/spec/spec_helper.rb +3 -0
  98. data/vendor/eac_config/Gemfile +5 -0
  99. data/vendor/eac_config/eac_config.gemspec +19 -0
  100. data/vendor/eac_config/lib/eac_config.rb +7 -0
  101. data/vendor/eac_config/lib/eac_config/entry.rb +49 -0
  102. data/vendor/eac_config/lib/eac_config/entry_path.rb +41 -0
  103. data/vendor/eac_config/lib/eac_config/envvars_node.rb +25 -0
  104. data/vendor/eac_config/lib/eac_config/envvars_node/entry.rb +54 -0
  105. data/vendor/eac_config/lib/eac_config/load_nodes_search.rb +39 -0
  106. data/vendor/eac_config/lib/eac_config/load_path.rb +28 -0
  107. data/vendor/eac_config/lib/eac_config/node.rb +67 -0
  108. data/vendor/eac_config/lib/eac_config/node_entry.rb +18 -0
  109. data/vendor/eac_config/lib/eac_config/node_uri.rb +38 -0
  110. data/vendor/{eac_ruby_utils/lib/eac_ruby_utils/configs.rb → eac_config/lib/eac_config/old_configs.rb} +6 -5
  111. data/vendor/{eac_ruby_utils/lib/eac_ruby_utils/configs → eac_config/lib/eac_config/old_configs}/base.rb +5 -5
  112. data/vendor/{eac_ruby_utils/lib/eac_ruby_utils/configs → eac_config/lib/eac_config/old_configs}/file.rb +4 -4
  113. data/vendor/{eac_ruby_utils/lib/eac_ruby_utils → eac_config/lib/eac_config}/paths_hash.rb +8 -8
  114. data/vendor/{eac_ruby_utils/lib/eac_ruby_utils → eac_config/lib/eac_config}/paths_hash/entry_key_error.rb +1 -1
  115. data/vendor/{eac_ruby_utils/lib/eac_ruby_utils → eac_config/lib/eac_config}/paths_hash/node.rb +2 -2
  116. data/vendor/{eac_ruby_utils/lib/eac_ruby_utils → eac_config/lib/eac_config}/paths_hash/path_search.rb +4 -4
  117. data/vendor/eac_config/lib/eac_config/version.rb +5 -0
  118. data/vendor/eac_config/lib/eac_config/yaml_file_node.rb +48 -0
  119. data/vendor/eac_config/lib/eac_config/yaml_file_node/entry.rb +37 -0
  120. data/vendor/eac_config/spec/lib/eac_config/entry_path_spec.rb +30 -0
  121. data/vendor/eac_config/spec/lib/eac_config/envvars_node/entry_spec.rb +14 -0
  122. data/vendor/eac_config/spec/lib/eac_config/envvars_node_spec.rb +40 -0
  123. data/vendor/{eac_ruby_utils/spec/lib/eac_ruby_utils/configs_spec.rb → eac_config/spec/lib/eac_config/old_configs_spec.rb} +2 -2
  124. data/vendor/{eac_ruby_utils/spec/lib/eac_ruby_utils → eac_config/spec/lib/eac_config}/paths_hash_spec.rb +6 -6
  125. data/vendor/eac_config/spec/lib/eac_config/yaml_file_node_spec.rb +52 -0
  126. data/vendor/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1.yaml +6 -0
  127. data/vendor/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1_1.yaml +2 -0
  128. data/vendor/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1_2.yaml +4 -0
  129. data/vendor/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1_2/storage1_2_1.yaml +2 -0
  130. data/vendor/eac_config/spec/rubocop_spec.rb +3 -0
  131. data/vendor/eac_config/spec/spec_helper.rb +17 -0
  132. data/vendor/eac_docker/eac_docker.gemspec +3 -2
  133. data/vendor/eac_docker/lib/eac_docker/images/templatized.rb +1 -0
  134. data/vendor/eac_docker/lib/eac_docker/version.rb +1 -1
  135. data/vendor/eac_docker/spec/lib/eac_docker/images/templatized_spec.rb +2 -1
  136. data/vendor/eac_docker/spec/rubocop_spec.rb +1 -5
  137. data/vendor/eac_docker/spec/spec_helper.rb +3 -0
  138. data/vendor/eac_ruby_base0/eac_ruby_base0.gemspec +4 -4
  139. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/application.rb +23 -9
  140. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/application_xdg.rb +34 -0
  141. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/core_ext.rb +4 -0
  142. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb +31 -0
  143. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/patches.rb +4 -0
  144. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/patches/class.rb +4 -0
  145. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/patches/class/jobs_runner.rb +10 -0
  146. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/patches/object.rb +5 -0
  147. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/patches/object/runner_with.rb +5 -0
  148. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb +22 -12
  149. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner/test_all.rb +4 -9
  150. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with.rb +9 -0
  151. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with/confirmation.rb +43 -0
  152. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with/filesystem_traverser.rb +52 -0
  153. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with/input.rb +36 -0
  154. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with/output.rb +58 -0
  155. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
  156. data/vendor/eac_ruby_base0/spec/lib/eac_ruby_base0/runner_with/confirmation_spec.rb +42 -0
  157. data/vendor/eac_ruby_base0/spec/lib/eac_ruby_base0/runner_with/output_spec.rb +81 -0
  158. data/vendor/eac_ruby_base0/spec/rubocop_spec.rb +1 -5
  159. data/vendor/eac_ruby_base0/spec/spec_helper.rb +3 -0
  160. data/vendor/eac_ruby_utils/eac_ruby_utils.gemspec +2 -3
  161. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/context.rb +31 -0
  162. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/contextualizable.rb +12 -7
  163. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/command.rb +10 -5
  164. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/filesystem_cache.rb +6 -0
  165. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/fs/logs.rb +63 -0
  166. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/fs/traverser.rb +0 -2
  167. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/inflector.rb +13 -2
  168. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/listable/list.rb +3 -2
  169. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/local_time_zone.rb +48 -0
  170. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/class/settings_provider.rb +10 -0
  171. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/kernel.rb +4 -0
  172. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/kernel/nyi.rb +10 -0
  173. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/module/common_concern.rb +0 -1
  174. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/module/context.rb +11 -0
  175. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/module/speaker.rb +9 -0
  176. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/if_nil.rb +17 -0
  177. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/regexp/to_parser.rb +10 -0
  178. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/string/inflector.rb +4 -2
  179. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/time/required_zone.rb +11 -0
  180. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/regexp_parser.rb +34 -0
  181. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/conditional.rb +1 -4
  182. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/settings_provider.rb +10 -29
  183. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/settings_provider/setting_value.rb +69 -0
  184. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/simple_cache.rb +26 -5
  185. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/speaker.rb +16 -0
  186. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/speaker/receiver.rb +57 -0
  187. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/speaker/sender.rb +32 -0
  188. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  189. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/inflector_spec.rb +2 -1
  190. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/local_time_zone_spec.rb +17 -0
  191. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/speaker_spec.rb +13 -0
  192. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/settings_provider_spec.rb +8 -0
  193. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/simple_cache_spec.rb +27 -0
  194. data/vendor/eac_ruby_utils/spec/rubocop_check_spec.rb +1 -5
  195. data/vendor/eac_ruby_utils/spec/spec_helper.rb +3 -0
  196. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/convert_job.rb +1 -1
  197. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/web_utils/videos/files_list.rb +1 -1
  198. metadata +157 -67
  199. data/vendor/eac_cli/lib/eac_cli/docopt/doc_builder.rb +0 -55
  200. data/vendor/eac_cli/lib/eac_cli/docopt/doc_builder/alternative.rb +0 -50
  201. data/vendor/eac_cli/lib/eac_cli/docopt/runner_extension.rb +0 -46
  202. data/vendor/eac_cli/lib/eac_cli/runner_with/output_file.rb +0 -30
  203. data/vendor/eac_cli/spec/lib/eac_cli/docopt/runner_extension_spec.rb +0 -35
  204. data/vendor/eac_cli/spec/lib/eac_cli/runner_with/output_file_spec.rb +0 -53
  205. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console.rb +0 -5
  206. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs.rb +0 -38
  207. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs/entry_reader.rb +0 -81
  208. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs/password_entry_reader.rb +0 -18
  209. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs/store_passwords_entry_reader.rb +0 -27
  210. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner.rb +0 -45
  211. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner/_class_methods.rb +0 -18
  212. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner/_doc.rb +0 -25
  213. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner/_settings.rb +0 -19
  214. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner/_subcommands.rb +0 -154
  215. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/speaker.rb +0 -133
  216. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/speaker/_class_methods.rb +0 -39
  217. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/speaker/_constants.rb +0 -14
  218. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/speaker/list.rb +0 -63
  219. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/speaker/node.rb +0 -26
  220. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/module/console_speaker.rb +0 -10
  221. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/module/template.rb +0 -10
  222. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/template.rb +0 -9
  223. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/time/default_time_zone_set.rb +0 -5
  224. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/time/local_time_zone.rb +0 -25
  225. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/templates.rb +0 -9
  226. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/templates/directory.rb +0 -110
  227. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/templates/file.rb +0 -50
  228. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/templates/searcher.rb +0 -55
  229. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/templates/variable_not_found_error.rb +0 -7
  230. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/templates/variable_providers.rb +0 -25
  231. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/templates/variable_providers/base.rb +0 -23
  232. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/templates/variable_providers/entries_reader.rb +0 -25
  233. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/templates/variable_providers/generic.rb +0 -25
  234. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/templates/variable_providers/hash.rb +0 -29
  235. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/console/docopt_runner_spec.rb +0 -136
  236. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/console_speaker_spec.rb +0 -13
  237. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/template_spec.rb +0 -23
  238. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/templates/file_spec.rb +0 -35
  239. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/templates/file_spec_files/expected_content +0 -2
  240. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/templates/file_spec_files/source.template +0 -2
  241. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/templates/searcher_spec.rb +0 -30
  242. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/templates/searcher_spec_files/path1/subdir1/file1.template +0 -1
  243. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/templates/searcher_spec_files/path1/subdir1/file2 +0 -1
  244. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/templates/searcher_spec_files/path2/subdir1/file3.template +0 -1
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/patches/eac_ruby_gems_utils/gem'
4
+ require 'i18n'
5
+
6
+ module Avm
7
+ module Apps
8
+ module Sources
9
+ class Configuration < ::EacConfig::OldConfigs
10
+ LOCALE_KEY = :locale
11
+
12
+ def locale
13
+ read_entry(LOCALE_KEY) || ::I18n.default_locale
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Avm
4
+ module Apps
5
+ module Sources
6
+ class Configuration < ::EacConfig::OldConfigs
7
+ RUBOCOP_COMMAND_KEY = 'ruby.rubocop.command'
8
+ RUBOCOP_GEMFILE_KEY = 'ruby.rubocop.gemfile'
9
+
10
+ def rubocop_command
11
+ read_command(RUBOCOP_COMMAND_KEY)
12
+ end
13
+
14
+ def rubocop_gemfile
15
+ gemfile_path = read_entry(RUBOCOP_GEMFILE_KEY)
16
+ return nil if gemfile_path.blank?
17
+
18
+ gemfile_path = gemfile_path.to_pathname.expand_path(storage_path.parent)
19
+ return gemfile_path if gemfile_path.file?
20
+
21
+ raise "Gemfile path \"#{gemfile_path}\" does not exist or is not a file"
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/patches/eac_ruby_gems_utils/gem'
4
+
5
+ module Avm
6
+ module Apps
7
+ module Sources
8
+ class Configuration < ::EacConfig::OldConfigs
9
+ BUNDLE_TEST_COMMAND_KEY = 'test.bundle_command'
10
+ TEST_COMMAND_KEY = 'test.command'
11
+
12
+ def any_test_command
13
+ bundle_test_command || test_command
14
+ end
15
+
16
+ def test_command
17
+ read_command(TEST_COMMAND_KEY)
18
+ end
19
+
20
+ def bundle_test_command
21
+ read_entry(BUNDLE_TEST_COMMAND_KEY).if_present do |v|
22
+ args = v.is_a?(::Enumerable) ? v.map(&:to_s) : ::Shellwords.split(v)
23
+ ::EacRubyGemsUtils::Gem.new(::File.dirname(storage_path)).bundle(*args).chdir_root
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Avm
4
+ module Apps
5
+ VERSION = '0.4.0'
6
+ end
7
+ end
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ ::EacRubyGemSupport::Rspec.default.describe_rubocop
@@ -0,0 +1,103 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file was generated by the `rspec --init` command. Conventionally, all
4
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
5
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
6
+ # this file to always be loaded, without a need to explicitly require it in any
7
+ # files.
8
+ #
9
+ # Given that it is always loaded, you are encouraged to keep this file as
10
+ # light-weight as possible. Requiring heavyweight dependencies from this file
11
+ # will add to the boot time of your test suite on EVERY test run, even for an
12
+ # individual file that may not need all of that loaded. Instead, consider making
13
+ # a separate helper file that requires the additional dependencies and performs
14
+ # the additional setup, and require it from the spec files that actually need
15
+ # it.
16
+ #
17
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
18
+ RSpec.configure do |config|
19
+ # rspec-expectations config goes here. You can use an alternate
20
+ # assertion/expectation library such as wrong or the stdlib/minitest
21
+ # assertions if you prefer.
22
+ config.expect_with :rspec do |expectations|
23
+ # This option will default to `true` in RSpec 4. It makes the `description`
24
+ # and `failure_message` of custom matchers include text for helper methods
25
+ # defined using `chain`, e.g.:
26
+ # be_bigger_than(2).and_smaller_than(4).description
27
+ # # => "be bigger than 2 and smaller than 4"
28
+ # ...rather than:
29
+ # # => "be bigger than 2"
30
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
31
+ end
32
+
33
+ # rspec-mocks config goes here. You can use an alternate test double
34
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
35
+ config.mock_with :rspec do |mocks|
36
+ # Prevents you from mocking or stubbing a method that does not exist on
37
+ # a real object. This is generally recommended, and will default to
38
+ # `true` in RSpec 4.
39
+ mocks.verify_partial_doubles = true
40
+ end
41
+
42
+ # This option will default to `:apply_to_host_groups` in RSpec 4 (and will
43
+ # have no way to turn it off -- the option exists only for backwards
44
+ # compatibility in RSpec 3). It causes shared context metadata to be
45
+ # inherited by the metadata hash of host groups and examples, rather than
46
+ # triggering implicit auto-inclusion in groups with matching metadata.
47
+ config.shared_context_metadata_behavior = :apply_to_host_groups
48
+
49
+ # The settings below are suggested to provide a good initial experience
50
+ # with RSpec, but feel free to customize to your heart's content.
51
+ # # This allows you to limit a spec run to individual examples or groups
52
+ # # you care about by tagging them with `:focus` metadata. When nothing
53
+ # # is tagged with `:focus`, all examples get run. RSpec also provides
54
+ # # aliases for `it`, `describe`, and `context` that include `:focus`
55
+ # # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
56
+ # config.filter_run_when_matching :focus
57
+ #
58
+ # # Allows RSpec to persist some state between runs in order to support
59
+ # # the `--only-failures` and `--next-failure` CLI options. We recommend
60
+ # # you configure your source control system to ignore this file.
61
+ # config.example_status_persistence_file_path = "spec/examples.txt"
62
+ #
63
+ # # Limits the available syntax to the non-monkey patched syntax that is
64
+ # # recommended. For more details, see:
65
+ # # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
66
+ # # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
67
+ # # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
68
+ # config.disable_monkey_patching!
69
+ #
70
+ # # This setting enables warnings. It's recommended, but in some cases may
71
+ # # be too noisy due to issues in dependencies.
72
+ # config.warnings = true
73
+ #
74
+ # # Many RSpec users commonly either run the entire suite or an individual
75
+ # # file, and it's useful to allow more verbose output when running an
76
+ # # individual spec file.
77
+ # if config.files_to_run.one?
78
+ # # Use the documentation formatter for detailed output,
79
+ # # unless a formatter has already been configured
80
+ # # (e.g. via a command-line flag).
81
+ # config.default_formatter = "doc"
82
+ # end
83
+ #
84
+ # # Print the 10 slowest examples and example groups at the
85
+ # # end of the spec run, to help surface which specs are running
86
+ # # particularly slow.
87
+ # config.profile_examples = 10
88
+ #
89
+ # # Run specs in random order to surface order dependencies. If you find an
90
+ # # order dependency and want to debug it, you can fix the order by providing
91
+ # # the seed, which is printed after each run.
92
+ # # --seed 1234
93
+ # config.order = :random
94
+ #
95
+ # # Seed global randomization in this process using the `--seed` CLI option.
96
+ # # Setting this allows you to use `--seed` to deterministically reproduce
97
+ # # test failures related to randomization by passing the same `--seed` value
98
+ # # as the one that triggered the failure.
99
+ # Kernel.srand config.seed
100
+
101
+ require 'eac_ruby_gem_support/rspec'
102
+ ::EacRubyGemSupport::Rspec.setup(::File.expand_path('..', __dir__), config)
103
+ end
@@ -12,7 +12,9 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib}/**/*', 'Gemfile']
14
14
 
15
- s.add_dependency 'eac_ruby_utils', '~> 0.55'
15
+ s.add_dependency 'colorize', '~> 0.8.1'
16
+ s.add_dependency 'eac_config', '~> 0.3'
17
+ s.add_dependency 'eac_ruby_utils', '~> 0.67'
16
18
 
17
- s.add_development_dependency 'eac_ruby_gem_support', '~> 0.1', '>= 0.1.2'
19
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.2'
18
20
  end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EacCli
4
+ class Config
5
+ require_sub __FILE__
6
+ attr_reader :sub
7
+
8
+ def initialize(sub_node)
9
+ @sub = sub_node
10
+ end
11
+
12
+ def entry(path, options = {})
13
+ ::EacCli::Config::Entry.new(self, path, options)
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_cli/speaker'
4
+ require 'eac_config/entry_path'
5
+ require 'eac_ruby_utils/core_ext'
6
+
7
+ module EacCli
8
+ class Config
9
+ class Entry
10
+ require_sub __FILE__, include_modules: true
11
+ enable_listable
12
+ enable_simple_cache
13
+ enable_speaker
14
+
15
+ common_constructor :config, :path, :options do
16
+ self.path = ::EacConfig::EntryPath.assert(path)
17
+ self.options = ::EacCli::Config::Entry::Options.new(options)
18
+ end
19
+
20
+ def value
21
+ return sub_value_to_return if sub_entry.found?
22
+ return nil unless options.required?
23
+
24
+ puts "|#{sub_entry.path}|"
25
+
26
+ input_value
27
+ end
28
+
29
+ delegate :value=, to: :sub_entry
30
+
31
+ private
32
+
33
+ def sub_value_to_return
34
+ sub_entry.value.presence || ::EacRubyUtils::BlankNotBlank.instance
35
+ end
36
+
37
+ def sub_entry_uncached
38
+ config.sub.entry(path)
39
+ end
40
+
41
+ def input_value_uncached
42
+ r = send("#{options.type}_value")
43
+ sub_entry.value = r if options.store?
44
+ r
45
+ end
46
+ end
47
+ end
48
+ end
@@ -2,21 +2,26 @@
2
2
 
3
3
  require 'eac_ruby_utils/core_ext'
4
4
 
5
- module EacRubyUtils
6
- module Console
7
- class Configs
8
- class ReadEntryOptions
5
+ module EacCli
6
+ class Config
7
+ class Entry
8
+ class Options
9
9
  enable_simple_cache
10
- common_constructor :options do
11
- self.options = options.to_h.symbolize_keys
12
- .assert_valid_keys(DEFAULT_VALUES.keys).freeze
13
- end
10
+ enable_listable
11
+
12
+ lists.add_symbol :type, :undefined
14
13
 
15
14
  DEFAULT_VALUES = {
16
15
  before_input: nil, bool: false, list: false, noecho: false, noenv: false, noinput: false,
17
- required: true, store: true, validator: nil
16
+ required: true, store: true, type: TYPE_UNDEFINED, validator: nil
18
17
  }.freeze
19
18
 
19
+ lists.add_symbol :option, *DEFAULT_VALUES.keys
20
+
21
+ common_constructor :options do
22
+ self.options = self.class.lists.option.hash_keys_validate!(options)
23
+ end
24
+
20
25
  delegate :to_h, to: :options
21
26
 
22
27
  def [](key)
@@ -27,6 +32,12 @@ module EacRubyUtils
27
32
  values.slice(:bool, :list, :noecho)
28
33
  end
29
34
 
35
+ DEFAULT_VALUES.each do |attr, default_value|
36
+ define_method(attr.to_s + ([true, false].include?(default_value) ? '?' : '')) do
37
+ self[attr]
38
+ end
39
+ end
40
+
30
41
  private
31
42
 
32
43
  def values_uncached
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module EacCli
6
+ class Config
7
+ class Entry
8
+ module Undefined
9
+ private
10
+
11
+ def undefined_value
12
+ loop do
13
+ entry_value = undefined_value_no_loop
14
+ next unless options[:validator].if_present(true) { |v| v.call(entry_value) }
15
+
16
+ return entry_value
17
+ end
18
+ end
19
+
20
+ def undefined_value_no_loop
21
+ input("Value for entry \"#{path}\"", options.request_input_options)
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -2,3 +2,5 @@
2
2
 
3
3
  require 'eac_ruby_utils/core_ext'
4
4
  require 'eac_cli/patches'
5
+
6
+ ::EacCli::RunnerWithSet.default.add_namespace(::EacCli::RunnerWith)
@@ -7,7 +7,7 @@ module EacCli
7
7
  module DefaultRunner
8
8
  common_concern do
9
9
  include ::EacCli::RunnerWith::Help
10
- enable_console_speaker
10
+ enable_speaker
11
11
  enable_simple_cache
12
12
  end
13
13
  end
@@ -10,15 +10,12 @@ module EacCli
10
10
  SUBCOMMAND_NAME_ARG = :subcommand
11
11
  SUBCOMMAND_ARGS_ARG = :subcommand_args
12
12
 
13
- def arg_opt(short, long, description, option_options = {})
14
- options_set << ::EacCli::Definition::ArgumentOption.new(
15
- short, long, description, option_options
16
- )
13
+ def arg_opt(*args)
14
+ options_set << ::EacCli::Definition::ArgumentOption.from_args(args)
17
15
  end
18
16
 
19
- def bool_opt(short, long, description, option_options = {})
20
- options_set << ::EacCli::Definition::BooleanOption.new(short, long, description,
21
- option_options)
17
+ def bool_opt(*args)
18
+ options_set << ::EacCli::Definition::BooleanOption.from_args(args)
22
19
  end
23
20
 
24
21
  def options
@@ -8,6 +8,14 @@ module EacCli
8
8
  def argument?
9
9
  true
10
10
  end
11
+
12
+ def build_value(new_value, previous_value)
13
+ repeat? ? previous_value + [new_value] : new_value
14
+ end
15
+
16
+ def default_value
17
+ repeat? ? [] : nil
18
+ end
11
19
  end
12
20
  end
13
21
  end
@@ -5,22 +5,38 @@ require 'eac_ruby_utils/core_ext'
5
5
  module EacCli
6
6
  class Definition
7
7
  class BaseOption
8
+ require_sub __FILE__
9
+
10
+ class << self
11
+ def from_args(args)
12
+ p = ::EacCli::Definition::BaseOption::InitializeArgsParser.new(args)
13
+ new(p.short, p.long, p.description, p.options)
14
+ end
15
+ end
16
+
8
17
  DEFAULT_REQUIRED = false
9
18
 
10
19
  enable_listable
11
- lists.add_symbol :option, :optional, :usage, :required
12
- attr_reader :short, :long, :description, :options
13
-
14
- def initialize(short, long, description, options = {})
15
- @short = short
16
- @long = long
17
- @description = description
18
- @options = options.symbolize_keys
19
- @options.assert_valid_keys(::EacCli::Definition::BaseOption.lists.option.values)
20
+ enable_abstract_methods :build_value, :default_value
21
+ lists.add_symbol :option, :optional, :usage, :repeat, :required
22
+ common_constructor :short, :long, :description, :options, default: [{}] do
23
+ raise 'Nor short neither long selector was set' if short.blank? && long.blank?
24
+
25
+ self.options = ::EacCli::Definition::BaseOption.lists.option.hash_keys_validate!(
26
+ options.symbolize_keys
27
+ )
20
28
  end
21
29
 
22
30
  def identifier
23
- long.to_s.variableize.to_sym
31
+ [long, short].each do |v|
32
+ v.to_s.if_present { |vv| return vv.variableize.to_sym }
33
+ end
34
+
35
+ raise 'No short or long option to build identifier'
36
+ end
37
+
38
+ def repeat?
39
+ options[OPTION_REPEAT]
24
40
  end
25
41
 
26
42
  def required?