avm-tools 0.103.0 → 0.106.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (225) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avm/data/package/dump.rb +1 -1
  3. data/lib/avm/instances/base/dockerizable.rb +2 -1
  4. data/lib/avm/launcher/context/instance_collector.rb +46 -0
  5. data/lib/avm/launcher/instances/runner_helper.rb +22 -16
  6. data/lib/avm/launcher/paths/logical.rb +5 -0
  7. data/lib/avm/{core_ext.rb → tools/core_ext.rb} +0 -0
  8. data/lib/avm/tools/runner/app_src/eac_asciidoctor_base0/build.rb +1 -1
  9. data/lib/avm/tools/runner/app_src/info.rb +1 -1
  10. data/lib/avm/tools/runner/app_src/ruby/bundler/gemfile_lock/git.rb +62 -0
  11. data/lib/avm/tools/runner/app_src/ruby/bundler/gemfile_lock.rb +11 -41
  12. data/lib/avm/tools/runner/app_src/test.rb +1 -1
  13. data/lib/avm/tools/runner/app_src/update.rb +1 -1
  14. data/lib/avm/tools/runner/config/load_path.rb +1 -1
  15. data/lib/avm/tools/runner/config.rb +1 -1
  16. data/lib/avm/tools/runner/git/dirty_files.rb +1 -1
  17. data/lib/avm/tools/runner/git/issue/complete.rb +1 -1
  18. data/lib/avm/tools/runner/git/issue/deliver.rb +1 -1
  19. data/lib/avm/tools/runner/git/issue.rb +1 -1
  20. data/lib/avm/tools/runner/git/revisions_test.rb +1 -1
  21. data/lib/avm/tools/runner/git/subrepo/check.rb +1 -1
  22. data/lib/avm/tools/runner/git/subrepo/clone.rb +1 -1
  23. data/lib/avm/tools/runner/git/subrepo/fix.rb +1 -1
  24. data/lib/avm/tools/runner/git/subrepo.rb +1 -1
  25. data/lib/avm/tools/runner/git.rb +1 -1
  26. data/lib/avm/tools/runner/launcher/instances.rb +7 -5
  27. data/lib/avm/tools/runner/launcher/projects.rb +2 -4
  28. data/lib/avm/tools/runner/launcher/publish.rb +2 -6
  29. data/lib/avm/tools/runner/launcher.rb +1 -1
  30. data/lib/avm/tools/runner/ruby/rubocop.rb +1 -1
  31. data/lib/avm/tools/runner/self.rb +1 -1
  32. data/lib/avm/tools/version.rb +1 -1
  33. data/vendor/avm/avm.gemspec +4 -1
  34. data/vendor/avm/lib/avm/docker/runner.rb +4 -8
  35. data/{lib → vendor/avm/lib}/avm/executables.rb +1 -1
  36. data/{lib → vendor/avm/lib}/avm/files/appendable/file_content.rb +0 -0
  37. data/{lib → vendor/avm/lib}/avm/files/appendable/plain_directory.rb +0 -0
  38. data/{lib → vendor/avm/lib}/avm/files/appendable/resource_base.rb +0 -0
  39. data/{lib → vendor/avm/lib}/avm/files/appendable/tar_output_command.rb +0 -0
  40. data/{lib → vendor/avm/lib}/avm/files/appendable/templatized_directory.rb +1 -0
  41. data/{lib → vendor/avm/lib}/avm/files/appendable.rb +0 -0
  42. data/{lib → vendor/avm/lib}/avm/files/appender.rb +0 -0
  43. data/{lib → vendor/avm/lib}/avm/files/deploy.rb +0 -1
  44. data/{lib → vendor/avm/lib}/avm/files/formatter/formats/base.rb +0 -0
  45. data/{lib → vendor/avm/lib}/avm/files/formatter/formats/generic_plain.rb +0 -0
  46. data/{lib → vendor/avm/lib}/avm/files/formatter/formats/html.rb +0 -0
  47. data/vendor/avm/lib/avm/files/formatter/formats/javascript.rb +23 -0
  48. data/{lib → vendor/avm/lib}/avm/files/formatter/formats/json.rb +0 -0
  49. data/{lib → vendor/avm/lib}/avm/files/formatter/formats/php.rb +0 -0
  50. data/{lib → vendor/avm/lib}/avm/files/formatter/formats/python.rb +0 -0
  51. data/{lib → vendor/avm/lib}/avm/files/formatter/formats/ruby.rb +0 -0
  52. data/{lib → vendor/avm/lib}/avm/files/formatter/formats/xml.rb +0 -0
  53. data/{lib → vendor/avm/lib}/avm/files/formatter/formats.rb +0 -0
  54. data/{lib → vendor/avm/lib}/avm/files/formatter/utf8_assert.rb +2 -0
  55. data/{lib → vendor/avm/lib}/avm/files/formatter.rb +1 -1
  56. data/{lib → vendor/avm/lib}/avm/files/info.rb +0 -0
  57. data/{lib → vendor/avm/lib}/avm/files/rotate.rb +0 -0
  58. data/{lib → vendor/avm/lib}/avm/files.rb +0 -0
  59. data/{lib → vendor/avm/lib}/avm/git/auto_commit/commit_info.rb +0 -0
  60. data/{lib → vendor/avm/lib}/avm/git/auto_commit/rules/base.rb +0 -0
  61. data/{lib → vendor/avm/lib}/avm/git/auto_commit/rules/last.rb +0 -0
  62. data/{lib → vendor/avm/lib}/avm/git/auto_commit/rules/manual.rb +0 -0
  63. data/{lib → vendor/avm/lib}/avm/git/auto_commit/rules/new.rb +0 -0
  64. data/{lib → vendor/avm/lib}/avm/git/auto_commit/rules/nth.rb +0 -0
  65. data/{lib → vendor/avm/lib}/avm/git/auto_commit/rules/unique.rb +0 -0
  66. data/{lib → vendor/avm/lib}/avm/git/auto_commit/rules.rb +0 -0
  67. data/{lib → vendor/avm/lib}/avm/git/auto_commit_path/ruby.rb +0 -0
  68. data/{lib → vendor/avm/lib}/avm/git/auto_commit_path.rb +1 -1
  69. data/{lib → vendor/avm/lib}/avm/git/commit/class_methods.rb +0 -0
  70. data/{lib → vendor/avm/lib}/avm/git/commit/deploy.rb +0 -1
  71. data/{lib → vendor/avm/lib}/avm/git/commit/deploy_methods.rb +0 -0
  72. data/{lib → vendor/avm/lib}/avm/git/commit/diff_tree_line.rb +0 -0
  73. data/{lib → vendor/avm/lib}/avm/git/commit/file.rb +2 -2
  74. data/{lib → vendor/avm/lib}/avm/git/commit.rb +3 -2
  75. data/{lib → vendor/avm/lib}/avm/git/file_auto_fixup.rb +0 -0
  76. data/{lib → vendor/avm/lib}/avm/git/issue/complete/commits.rb +0 -0
  77. data/{lib → vendor/avm/lib}/avm/git/issue/complete/git_subrepos.rb +0 -0
  78. data/{lib → vendor/avm/lib}/avm/git/issue/complete/local_branch.rb +0 -0
  79. data/{lib → vendor/avm/lib}/avm/git/issue/complete/local_tag.rb +0 -0
  80. data/{lib → vendor/avm/lib}/avm/git/issue/complete/push.rb +0 -0
  81. data/{lib → vendor/avm/lib}/avm/git/issue/complete/remote.rb +0 -0
  82. data/{lib → vendor/avm/lib}/avm/git/issue/complete/test.rb +0 -0
  83. data/{lib → vendor/avm/lib}/avm/git/issue/complete/tracker.rb +0 -0
  84. data/{lib → vendor/avm/lib}/avm/git/issue/complete/validation.rb +0 -0
  85. data/{lib → vendor/avm/lib}/avm/git/issue/complete/validations.rb +0 -0
  86. data/{lib → vendor/avm/lib}/avm/git/issue/complete/working_tree.rb +0 -0
  87. data/{lib → vendor/avm/lib}/avm/git/issue/complete.rb +1 -1
  88. data/{lib → vendor/avm/lib}/avm/git/issue/deliver.rb +1 -1
  89. data/{lib → vendor/avm/lib}/avm/git/issue.rb +0 -0
  90. data/{lib → vendor/avm/lib}/avm/git/organize/reference_update.rb +0 -0
  91. data/{lib → vendor/avm/lib}/avm/git/organize/repository.rb +0 -0
  92. data/{lib → vendor/avm/lib}/avm/git/organize.rb +0 -0
  93. data/{lib → vendor/avm/lib}/avm/git/revision_test.rb +0 -0
  94. data/{lib → vendor/avm/lib}/avm/git/subrepo_check/parent.rb +0 -0
  95. data/{lib → vendor/avm/lib}/avm/git/subrepo_check/remote.rb +0 -0
  96. data/{lib → vendor/avm/lib}/avm/git/subrepo_check/show_result.rb +0 -1
  97. data/{lib → vendor/avm/lib}/avm/git/subrepo_check.rb +0 -1
  98. data/{lib → vendor/avm/lib}/avm/git/subrepo_checks.rb +1 -1
  99. data/{lib → vendor/avm/lib}/avm/git.rb +0 -0
  100. data/{lib → vendor/avm/lib}/avm/instances/docker_image.rb +0 -0
  101. data/{lib → vendor/avm/lib}/avm/result.rb +0 -0
  102. data/vendor/avm/lib/avm/version.rb +1 -1
  103. data/vendor/avm/spec/lib/avm/git/auto_commit_path_spec.rb +21 -0
  104. data/vendor/avm/spec/lib/avm/git/commit/deploy_spec.rb +93 -0
  105. data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec.rb +13 -0
  106. data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/add.source.out +1 -0
  107. data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/add.target.yaml +7 -0
  108. data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/modify.source.out +1 -0
  109. data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/modify.target.yaml +7 -0
  110. data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/remove.source.out +1 -0
  111. data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/remove.target.yaml +7 -0
  112. data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename.source.out +2 -0
  113. data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename.target.yaml +13 -0
  114. data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename_modify.source.out +2 -0
  115. data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename_modify.target.yaml +13 -0
  116. data/vendor/avm/spec/lib/avm/git/commit_spec.rb +56 -0
  117. data/vendor/avm/spec/rubocop_spec.rb +1 -1
  118. data/vendor/avm/spec/spec_helper.rb +2 -100
  119. data/vendor/avm-apps/lib/avm/apps/version.rb +1 -1
  120. data/vendor/avm-apps/spec/rubocop_spec.rb +1 -1
  121. data/vendor/avm-apps/spec/spec_helper.rb +2 -101
  122. data/vendor/avm-eac_asciidoctor_base0/avm-eac_asciidoctor_base0.gemspec +1 -0
  123. data/{lib → vendor/avm-eac_asciidoctor_base0/lib}/avm/eac_asciidoctor_base0/apache_host.rb +0 -0
  124. data/{lib → vendor/avm-eac_asciidoctor_base0/lib}/avm/eac_asciidoctor_base0/apache_path.rb +0 -0
  125. data/{lib → vendor/avm-eac_asciidoctor_base0/lib}/avm/eac_asciidoctor_base0/deploy.rb +0 -0
  126. data/{lib → vendor/avm-eac_asciidoctor_base0/lib}/avm/eac_asciidoctor_base0/instance.rb +0 -0
  127. data/vendor/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/version.rb +1 -1
  128. data/vendor/avm-eac_asciidoctor_base0/spec/rubocop_spec.rb +1 -1
  129. data/vendor/avm-eac_asciidoctor_base0/spec/spec_helper.rb +2 -100
  130. data/vendor/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/logs.rb +1 -1
  131. data/vendor/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
  132. data/vendor/avm-eac_rails_base1/spec/rubocop_spec.rb +1 -1
  133. data/vendor/avm-eac_rails_base1/spec/spec_helper.rb +2 -100
  134. data/vendor/avm-eac_redmine_base0/Gemfile +5 -0
  135. data/vendor/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +19 -0
  136. data/{lib → vendor/avm-eac_redmine_base0/lib}/avm/eac_redmine_base0/apache_host.rb +0 -0
  137. data/{lib → vendor/avm-eac_redmine_base0/lib}/avm/eac_redmine_base0/core_update.rb +0 -0
  138. data/{lib → vendor/avm-eac_redmine_base0/lib}/avm/eac_redmine_base0/data_unit.rb +0 -0
  139. data/{lib → vendor/avm-eac_redmine_base0/lib}/avm/eac_redmine_base0/deploy.rb +0 -0
  140. data/{lib → vendor/avm-eac_redmine_base0/lib}/avm/eac_redmine_base0/instance.rb +2 -2
  141. data/vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/docker_image.rb +55 -0
  142. data/vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/patches/object/template.rb +7 -0
  143. data/vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +7 -0
  144. data/{lib/avm/eac_asciidoctor_base0.rb → vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0.rb} +1 -1
  145. data/vendor/avm-eac_redmine_base0/spec/rubocop_spec.rb +3 -0
  146. data/vendor/avm-eac_redmine_base0/spec/spec_helper.rb +4 -0
  147. data/{template → vendor/avm-eac_redmine_base0/template}/avm/eac_redmine_base0/deploy/config/install.sh.template +1 -0
  148. data/{template → vendor/avm-eac_redmine_base0/template}/avm/eac_redmine_base0/deploy/config/secrets.yml +0 -0
  149. data/{template/avm/eac_redmine_base0 → vendor/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances}/docker_image/Dockerfile.template +1 -1
  150. data/{template/avm/eac_redmine_base0 → vendor/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances}/docker_image/apache_http_virtualhost.conf.template +0 -0
  151. data/{template/avm/eac_redmine_base0 → vendor/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances}/docker_image/apache_https_virtualhost.conf.template +0 -0
  152. data/vendor/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/install_settings.sh.template +24 -0
  153. data/{template/avm/eac_redmine_base0 → vendor/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances}/docker_image/start.sh.template +0 -0
  154. data/vendor/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
  155. data/vendor/avm-eac_webapp_base0/spec/rubocop_spec.rb +1 -1
  156. data/vendor/avm-eac_webapp_base0/spec/spec_helper.rb +2 -100
  157. data/vendor/eac_cli/eac_cli.gemspec +3 -3
  158. data/vendor/eac_cli/lib/eac_cli/config/entry.rb +0 -2
  159. data/vendor/eac_cli/lib/eac_cli/definition/argument_option.rb +1 -1
  160. data/vendor/eac_cli/lib/eac_cli/definition/base_option.rb +9 -1
  161. data/vendor/eac_cli/lib/eac_cli/definition/boolean_option.rb +6 -0
  162. data/vendor/eac_cli/lib/eac_cli/runner_with/help/builder.rb +3 -3
  163. data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
  164. data/vendor/eac_cli/spec/lib/eac_cli/runner_spec.rb +6 -5
  165. data/vendor/eac_cli/spec/rubocop_spec.rb +1 -1
  166. data/vendor/eac_cli/spec/spec_helper.rb +2 -101
  167. data/vendor/eac_config/eac_config.gemspec +2 -2
  168. data/vendor/eac_config/lib/eac_config/version.rb +1 -1
  169. data/vendor/eac_config/spec/rubocop_spec.rb +1 -1
  170. data/vendor/eac_config/spec/spec_helper.rb +2 -15
  171. data/vendor/eac_docker/eac_docker.gemspec +2 -2
  172. data/vendor/eac_docker/lib/eac_docker/container.rb +7 -3
  173. data/vendor/eac_docker/lib/eac_docker/debug.rb +15 -0
  174. data/vendor/eac_docker/lib/eac_docker/images/coded.rb +4 -0
  175. data/vendor/eac_docker/lib/eac_docker/images/templatized.rb +16 -2
  176. data/vendor/eac_docker/lib/eac_docker/rspec/setup.rb +17 -0
  177. data/vendor/eac_docker/lib/eac_docker/rspec.rb +2 -10
  178. data/vendor/eac_docker/lib/eac_docker/version.rb +1 -1
  179. data/vendor/eac_docker/spec/rubocop_spec.rb +1 -1
  180. data/vendor/eac_docker/spec/spec_helper.rb +2 -104
  181. data/vendor/eac_git/eac_git.gemspec +3 -3
  182. data/vendor/eac_git/lib/eac_git/rspec/setup.rb +23 -0
  183. data/vendor/eac_git/lib/eac_git/rspec.rb +1 -14
  184. data/vendor/eac_git/lib/eac_git/version.rb +1 -1
  185. data/vendor/eac_git/spec/rubocop_spec.rb +1 -1
  186. data/vendor/eac_git/spec/spec_helper.rb +2 -104
  187. data/vendor/eac_ruby_base0/eac_ruby_base0.gemspec +4 -4
  188. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
  189. data/vendor/eac_ruby_base0/spec/rubocop_spec.rb +1 -1
  190. data/vendor/eac_ruby_base0/spec/spec_helper.rb +2 -101
  191. data/vendor/eac_ruby_gems_utils/eac_ruby_gems_utils.gemspec +2 -2
  192. data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/version.rb +1 -1
  193. data/vendor/eac_ruby_gems_utils/spec/code/rubocop_check_spec.rb +1 -1
  194. data/vendor/eac_ruby_gems_utils/spec/spec_helper.rb +2 -101
  195. data/vendor/eac_ruby_utils/eac_ruby_utils.gemspec +1 -1
  196. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/boolean.rb +1 -1
  197. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/compact.rb +22 -0
  198. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/executable.rb +15 -3
  199. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/fs_cache.rb +1 -1
  200. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/gems_registry/gem.rb +75 -0
  201. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/gems_registry.rb +35 -0
  202. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/compact.rb +20 -0
  203. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/string/delimited.rb +16 -0
  204. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/recursive_builder.rb +51 -0
  205. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/default_setup.rb +20 -0
  206. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup/conditionals.rb +17 -0
  207. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup.rb +12 -0
  208. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup_manager.rb +49 -0
  209. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/string_delimited.rb +70 -0
  210. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  211. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/compact_spec.rb +20 -0
  212. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/compact_spec.rb +20 -0
  213. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/string/delimited_spec.rb +34 -0
  214. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/recursive_builder_spec.rb +65 -0
  215. data/vendor/eac_ruby_utils/spec/rubocop_check_spec.rb +1 -1
  216. data/vendor/eac_ruby_utils/spec/spec_helper.rb +6 -6
  217. data/vendor/eac_templates/lib/eac_templates/version.rb +1 -1
  218. data/vendor/eac_templates/spec/rubocop_spec.rb +1 -1
  219. data/vendor/eac_templates/spec/spec_helper.rb +2 -100
  220. metadata +129 -91
  221. data/lib/avm/eac_redmine_base0/docker_image.rb +0 -52
  222. data/lib/avm/eac_redmine_base0.rb +0 -9
  223. data/template/avm/eac_redmine_base0/docker_image/install_settings.sh.template +0 -29
  224. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/conditional.rb +0 -35
  225. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/stubbed_ssh.rb +0 -44
@@ -1,106 +1,4 @@
1
1
  # frozen_string_literal: true
2
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
104
-
105
- require 'eac_docker/rspec'
106
- ::EacDocker::Rspec.configure
3
+ require 'eac_ruby_utils/rspec/default_setup'
4
+ ::EacRubyUtils::Rspec.default_setup_create(::File.expand_path('..', __dir__))
@@ -12,9 +12,9 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib,vendor}/**/*']
14
14
 
15
- s.add_dependency 'eac_ruby_utils', '~> 0.37'
15
+ s.add_dependency 'eac_ruby_utils', '~> 0.74'
16
16
  s.add_dependency 'parseconfig', '~> 1.0', '>= 1.0.8'
17
17
 
18
- s.add_development_dependency 'aranha-parsers', '~> 0.7'
19
- s.add_development_dependency 'eac_ruby_gem_support', '~> 0.2'
18
+ s.add_development_dependency 'aranha-parsers', '~> 0.8', '>= 0.8.2'
19
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.3', '>= 0.3.2'
20
20
  end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_git/executables'
4
+ require 'eac_git/rspec/stubbed_git_local_repo'
5
+
6
+ module EacGit
7
+ module Rspec
8
+ module Setup
9
+ def self.extended(setup_obj)
10
+ setup_obj.setup_conditional_git
11
+ setup_obj.setup_stubbed_git_local_repo
12
+ end
13
+
14
+ def setup_conditional_git
15
+ conditional(:git) { ::EacGit::Executables.git.validate }
16
+ end
17
+
18
+ def setup_stubbed_git_local_repo
19
+ rspec_config.include ::EacGit::Rspec::StubbedGitLocalRepo
20
+ end
21
+ end
22
+ end
23
+ end
@@ -1,22 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_ruby_utils/rspec/conditional'
4
- require 'eac_git/executables'
3
+ require 'eac_ruby_utils/core_ext'
5
4
 
6
5
  module EacGit
7
6
  module Rspec
8
7
  require_sub __FILE__
9
-
10
- class << self
11
- def configure
12
- ::EacRubyUtils::Rspec::Conditional.default.add(:git) do
13
- ::EacGit::Executables.git.validate
14
- end
15
- RSpec.configure do |config|
16
- ::EacRubyUtils::Rspec::Conditional.default.configure(config)
17
- config.include ::EacGit::Rspec::StubbedGitLocalRepo
18
- end
19
- end
20
- end
21
8
  end
22
9
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacGit
4
- VERSION = '0.6.0'
4
+ VERSION = '0.7.3'
5
5
  end
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- ::EacRubyGemSupport::Rspec.default.describe_rubocop
3
+ ::EacRubyUtils::Rspec.default_setup.describe_rubocop
@@ -1,106 +1,4 @@
1
1
  # frozen_string_literal: true
2
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
- require 'eac_ruby_gem_support/rspec'
101
- ::EacRubyGemSupport::Rspec.setup(::File.expand_path('..', __dir__), config)
102
- end
103
-
104
- require 'eac_git/rspec'
105
- ::EacGit::Rspec.configure
106
- require 'aranha/parsers/spec/source_target_fixtures_example'
3
+ require 'eac_ruby_utils/rspec/default_setup'
4
+ ::EacRubyUtils::Rspec.default_setup_create(::File.expand_path('..', __dir__))
@@ -12,9 +12,9 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib}/**/*']
14
14
 
15
- s.add_dependency 'eac_cli', '~> 0.20'
16
- s.add_dependency 'eac_ruby_gems_utils', '~> 0.8'
17
- s.add_dependency 'eac_ruby_utils', '~> 0.67'
15
+ s.add_dependency 'eac_cli', '~> 0.22', '>= 0.22.2'
16
+ s.add_dependency 'eac_ruby_gems_utils', '~> 0.9', '~> 0.9.5'
17
+ s.add_dependency 'eac_ruby_utils', '~> 0.70'
18
18
 
19
- s.add_development_dependency 'eac_ruby_gem_support', '~> 0.2'
19
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.3'
20
20
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyBase0
4
- VERSION = '0.10.0'
4
+ VERSION = '0.10.1'
5
5
  end
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- ::EacRubyGemSupport::Rspec.default.describe_rubocop
3
+ ::EacRubyUtils::Rspec.default_setup.describe_rubocop
@@ -1,103 +1,4 @@
1
1
  # frozen_string_literal: true
2
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
3
+ require 'eac_ruby_utils/rspec/default_setup'
4
+ ::EacRubyUtils::Rspec.default_setup_create(::File.expand_path('..', __dir__))
@@ -23,8 +23,8 @@ Gem::Specification.new do |s|
23
23
  s.test_files = Dir['{spec}/**/*', '.rspec']
24
24
 
25
25
  s.add_dependency 'bundler', '~> 2.2', '>= 2.2.17'
26
- s.add_dependency 'eac_ruby_utils', '~> 0.67'
26
+ s.add_dependency 'eac_ruby_utils', '~> 0.70'
27
27
 
28
28
  # Tests
29
- s.add_development_dependency 'eac_ruby_gem_support', '~> 0.2'
29
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.3'
30
30
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyGemsUtils
4
- VERSION = '0.9.4'
4
+ VERSION = '0.9.5'
5
5
  end
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- ::EacRubyGemSupport::Rspec.default.describe_rubocop
3
+ ::EacRubyUtils::Rspec.default_setup.describe_rubocop
@@ -1,103 +1,4 @@
1
1
  # frozen_string_literal: true
2
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
3
+ require 'eac_ruby_utils/rspec/default_setup'
4
+ ::EacRubyUtils::Rspec.default_setup_create(::File.expand_path('..', __dir__))
@@ -19,5 +19,5 @@ Gem::Specification.new do |s|
19
19
  s.add_dependency 'addressable', '~> 2.6'
20
20
  s.add_dependency 'filesize'
21
21
  s.add_dependency 'net-ssh', '~> 4.2'
22
- s.add_development_dependency 'eac_ruby_gem_support', '~> 0.2'
22
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.3', '>= 0.3.2'
23
23
  end
@@ -6,7 +6,7 @@ module EacRubyUtils
6
6
  def parse(value)
7
7
  return parse_string(value) if value.is_a?(::String)
8
8
  return parse_string(value.to_s) if value.is_a?(::Symbol)
9
- return parse_number(value) if value.is_a?(::Number)
9
+ return parse_number(value) if value.is_a?(::Numeric)
10
10
 
11
11
  value ? true : false
12
12
  end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EacRubyUtils
4
+ class Compact
5
+ attr_reader :object, :attributes
6
+
7
+ def initialize(object, attributes)
8
+ @object = object
9
+ @attributes = attributes
10
+ end
11
+
12
+ # @return [Array]
13
+ def to_a
14
+ attributes.map { |attr| object.send(attr) }
15
+ end
16
+
17
+ # @return [Hash]
18
+ def to_h
19
+ attributes.map { |attr| [attr.to_sym, object.send(attr)] }.to_h
20
+ end
21
+ end
22
+ end
@@ -22,7 +22,7 @@ module EacRubyUtils
22
22
  def validate
23
23
  return nil if exist?
24
24
 
25
- "Program \"#{name}\" not found in environment #{env}"
25
+ "Program \"#{::Shellwords.join(executable_args)}\" not found in environment #{env}"
26
26
  end
27
27
 
28
28
  def validate!
@@ -33,13 +33,25 @@ module EacRubyUtils
33
33
 
34
34
  def command(*command_args)
35
35
  validate!
36
- env.command(name, *command_args)
36
+ env.command(*executable_args, *command_args)
37
+ end
38
+
39
+ def executable_args
40
+ executable_args_from_envvar || [name]
41
+ end
42
+
43
+ def executable_args_envvar
44
+ "#{name}_command".variableize.upcase
45
+ end
46
+
47
+ def executable_args_from_envvar
48
+ ENV[executable_args_envvar].if_present { |v| ::Shellwords.split(v) }
37
49
  end
38
50
 
39
51
  private
40
52
 
41
53
  def exist_uncached
42
- env.command(name, *check_args).execute!
54
+ env.command(*executable_args, *check_args).execute!
43
55
  true
44
56
  rescue Errno::ENOENT
45
57
  false
@@ -6,7 +6,7 @@ require 'tmpdir'
6
6
  module EacRubyUtils
7
7
  class << self
8
8
  def fs_cache
9
- @fs_cache ||= ::EacRubyUtils::FilesystemCache.new(::Dir.tmpdir, 'eac_ruby_utils', '.cache')
9
+ @fs_cache ||= ::EacRubyUtils::FilesystemCache.new(::Dir.tmpdir, 'eac_ruby_utils_fs_cache')
10
10
  end
11
11
  end
12
12
  end