avm-tools 0.104.0 → 0.108.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avm/instances/entry.rb +3 -3
  3. data/lib/avm/launcher/context/instance_collector.rb +46 -0
  4. data/lib/avm/launcher/instances/runner_helper.rb +21 -15
  5. data/lib/avm/launcher/paths/logical.rb +5 -0
  6. data/lib/avm/patches/eac_ruby_gems_utils/gem.rb +2 -2
  7. data/lib/avm/ruby/rubocop/_configured.rb +2 -2
  8. data/lib/avm/tools/app_src.rb +68 -0
  9. data/lib/avm/tools/runner/app_src/info.rb +16 -2
  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/ruby/bundler/incompatible.rb +2 -4
  13. data/lib/avm/tools/runner/app_src.rb +2 -2
  14. data/lib/avm/tools/runner/config/load_path.rb +10 -5
  15. data/lib/avm/tools/runner/git/deploy.rb +2 -2
  16. data/lib/avm/tools/runner/launcher/instances.rb +7 -5
  17. data/lib/avm/tools/runner/launcher/projects.rb +2 -4
  18. data/lib/avm/tools/runner/launcher/publish.rb +2 -6
  19. data/lib/avm/tools/runner.rb +0 -4
  20. data/lib/avm/tools/version.rb +1 -1
  21. data/vendor/avm/avm.gemspec +3 -0
  22. data/{lib → vendor/avm/lib}/avm/data/instance/files_unit.rb +0 -0
  23. data/{lib → vendor/avm/lib}/avm/data/instance/package.rb +0 -0
  24. data/{lib → vendor/avm/lib}/avm/data/instance/unit.rb +0 -0
  25. data/{lib → vendor/avm/lib}/avm/data/instance.rb +0 -0
  26. data/{lib → vendor/avm/lib}/avm/data/package/dump.rb +0 -0
  27. data/{lib → vendor/avm/lib}/avm/data/package/load.rb +0 -0
  28. data/{lib → vendor/avm/lib}/avm/data/package.rb +0 -0
  29. data/{lib → vendor/avm/lib}/avm/data/unit.rb +0 -0
  30. data/vendor/avm/lib/avm/files/formatter/formats/base.rb +2 -2
  31. data/vendor/avm/lib/avm/files/formatter/formats/javascript.rb +1 -0
  32. data/vendor/avm/lib/avm/files/formatter/formats/php.rb +1 -0
  33. data/vendor/avm/lib/avm/files/formatter/formats/python.rb +1 -0
  34. data/vendor/avm/lib/avm/files/formatter/formats/xml.rb +1 -0
  35. data/vendor/avm/lib/avm/files/formatter/utf8_assert.rb +3 -1
  36. data/vendor/avm/lib/avm/git/issue/complete/test.rb +2 -2
  37. data/vendor/avm/lib/avm/git/revision_test.rb +2 -3
  38. data/vendor/avm/lib/avm/jobs/base.rb +62 -0
  39. data/vendor/avm/lib/avm/jobs/variables_source.rb +22 -0
  40. data/vendor/{avm-apps/lib/avm/apps.rb → avm/lib/avm/jobs.rb} +1 -1
  41. data/{lib → vendor/avm/lib}/avm/path_string.rb +0 -0
  42. data/vendor/avm/lib/avm/sources/base.rb +45 -0
  43. data/vendor/avm/lib/avm/sources/configuration/_locale.rb +16 -0
  44. data/vendor/avm/lib/avm/sources/configuration/_rubocop.rb +24 -0
  45. data/vendor/avm/lib/avm/sources/configuration/_tests.rb +27 -0
  46. data/vendor/avm/lib/avm/sources/configuration.rb +55 -0
  47. data/{lib/avm/eac_asciidoctor_base0.rb → vendor/avm/lib/avm/sources.rb} +1 -1
  48. data/{lib → vendor/avm/lib}/avm/sync.rb +0 -0
  49. data/vendor/avm/lib/avm/version.rb +1 -1
  50. data/vendor/avm/spec/lib/avm/git/auto_commit_path_spec.rb +4 -3
  51. data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec.rb +0 -1
  52. data/vendor/avm/spec/rubocop_spec.rb +1 -1
  53. data/vendor/avm/spec/spec_helper.rb +2 -17
  54. data/vendor/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/version.rb +1 -1
  55. data/vendor/avm-eac_asciidoctor_base0/spec/rubocop_spec.rb +1 -1
  56. data/vendor/avm-eac_asciidoctor_base0/spec/spec_helper.rb +2 -100
  57. data/vendor/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
  58. data/vendor/avm-eac_rails_base1/spec/rubocop_spec.rb +1 -1
  59. data/vendor/avm-eac_rails_base1/spec/spec_helper.rb +2 -100
  60. data/vendor/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +3 -1
  61. data/vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/core_update.rb +3 -2
  62. data/vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
  63. data/vendor/avm-eac_redmine_base0/spec/rubocop_spec.rb +1 -1
  64. data/vendor/avm-eac_redmine_base0/spec/spec_helper.rb +2 -100
  65. data/vendor/avm-eac_redmine_base0/template/avm/eac_redmine_base0/deploy/config/install.sh.template +1 -0
  66. data/vendor/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/apache_host.rb +2 -2
  67. data/vendor/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/apache_path.rb +2 -2
  68. data/vendor/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy.rb +2 -2
  69. data/vendor/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
  70. data/vendor/avm-eac_webapp_base0/spec/rubocop_spec.rb +1 -1
  71. data/vendor/avm-eac_webapp_base0/spec/spec_helper.rb +2 -100
  72. data/vendor/eac_cli/eac_cli.gemspec +3 -3
  73. data/vendor/eac_cli/lib/eac_cli/config.rb +6 -3
  74. data/vendor/eac_cli/lib/eac_cli/definition/argument_option.rb +1 -1
  75. data/vendor/eac_cli/lib/eac_cli/definition/base_option.rb +9 -1
  76. data/vendor/eac_cli/lib/eac_cli/definition/boolean_option.rb +6 -0
  77. data/vendor/eac_cli/lib/eac_cli/runner_with/help/builder.rb +3 -3
  78. data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
  79. data/vendor/eac_cli/spec/lib/eac_cli/runner_spec.rb +6 -5
  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/images/templatized.rb +4 -0
  89. data/vendor/eac_docker/lib/eac_docker/rspec/setup.rb +17 -0
  90. data/vendor/eac_docker/lib/eac_docker/rspec.rb +2 -10
  91. data/vendor/eac_docker/lib/eac_docker/version.rb +1 -1
  92. data/vendor/eac_docker/spec/rubocop_spec.rb +1 -1
  93. data/vendor/eac_docker/spec/spec_helper.rb +2 -104
  94. data/vendor/{avm-apps → eac_fs}/Gemfile +0 -0
  95. data/vendor/eac_fs/eac_fs.gemspec +20 -0
  96. data/vendor/{eac_ruby_utils/lib/eac_ruby_utils/filesystem_cache.rb → eac_fs/lib/eac_fs/cache.rb} +7 -2
  97. data/{lib/avm → vendor/eac_fs/lib/eac_fs}/cached_download.rb +4 -4
  98. data/vendor/eac_fs/lib/eac_fs/file_info.rb +29 -0
  99. data/vendor/eac_fs/lib/eac_fs/patches/module/fs_cache.rb +10 -0
  100. data/vendor/eac_fs/lib/eac_fs/patches/module.rb +4 -0
  101. data/vendor/eac_fs/lib/eac_fs/patches/object/fs_cache.rb +15 -0
  102. data/vendor/eac_fs/lib/eac_fs/patches/object.rb +4 -0
  103. data/vendor/eac_fs/lib/eac_fs/patches/pathname/info.rb +12 -0
  104. data/vendor/eac_fs/lib/eac_fs/patches/pathname.rb +4 -0
  105. data/vendor/eac_fs/lib/eac_fs/patches.rb +4 -0
  106. data/vendor/eac_fs/lib/eac_fs/version.rb +5 -0
  107. data/vendor/eac_fs/lib/eac_fs.rb +7 -0
  108. data/vendor/{eac_ruby_utils/spec/lib/eac_ruby_utils/filesystem_cache_spec.rb → eac_fs/spec/lib/eac_fs/cache_spec.rb} +2 -2
  109. data/vendor/eac_fs/spec/rubocop_spec.rb +3 -0
  110. data/vendor/eac_fs/spec/spec_helper.rb +4 -0
  111. data/vendor/eac_git/eac_git.gemspec +3 -3
  112. data/vendor/eac_git/lib/eac_git/local/commit/archive.rb +1 -1
  113. data/vendor/eac_git/lib/eac_git/local/commit.rb +3 -3
  114. data/vendor/eac_git/lib/eac_git/local.rb +13 -0
  115. data/vendor/eac_git/lib/eac_git/rspec/setup.rb +23 -0
  116. data/vendor/eac_git/lib/eac_git/rspec.rb +1 -14
  117. data/vendor/eac_git/lib/eac_git/version.rb +1 -1
  118. data/vendor/eac_git/spec/rubocop_spec.rb +1 -1
  119. data/vendor/eac_git/spec/spec_helper.rb +2 -104
  120. data/vendor/eac_ruby_base0/eac_ruby_base0.gemspec +5 -4
  121. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/application.rb +4 -4
  122. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/core_ext.rb +1 -0
  123. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb +16 -7
  124. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
  125. data/vendor/eac_ruby_base0/spec/rubocop_spec.rb +1 -1
  126. data/vendor/eac_ruby_base0/spec/spec_helper.rb +2 -101
  127. data/vendor/eac_ruby_gems_utils/eac_ruby_gems_utils.gemspec +2 -2
  128. data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/base.rb +0 -5
  129. data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/version.rb +1 -1
  130. data/vendor/eac_ruby_gems_utils/spec/code/rubocop_check_spec.rb +1 -1
  131. data/vendor/eac_ruby_gems_utils/spec/spec_helper.rb +2 -101
  132. data/vendor/eac_ruby_utils/eac_ruby_utils.gemspec +1 -1
  133. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/compact.rb +22 -0
  134. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/executable.rb +15 -3
  135. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/gems_registry/gem.rb +75 -0
  136. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/gems_registry.rb +35 -0
  137. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/compact.rb +20 -0
  138. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/string/delimited.rb +16 -0
  139. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/recursive_builder.rb +51 -0
  140. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/default_setup.rb +20 -0
  141. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup/conditionals.rb +17 -0
  142. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup.rb +12 -0
  143. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup_manager.rb +49 -0
  144. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/string_delimited.rb +70 -0
  145. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  146. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/compact_spec.rb +20 -0
  147. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/compact_spec.rb +20 -0
  148. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/string/delimited_spec.rb +34 -0
  149. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/recursive_builder_spec.rb +65 -0
  150. data/vendor/eac_ruby_utils/spec/rubocop_check_spec.rb +1 -1
  151. data/vendor/eac_ruby_utils/spec/spec_helper.rb +6 -6
  152. data/vendor/eac_templates/lib/eac_templates/patches/module/erb_template.rb +9 -0
  153. data/vendor/eac_templates/lib/eac_templates/patches/module.rb +4 -0
  154. data/vendor/eac_templates/lib/eac_templates/patches/object/erb_template.rb +9 -0
  155. data/vendor/eac_templates/lib/eac_templates/patches/object.rb +4 -0
  156. data/vendor/eac_templates/lib/eac_templates/patches.rb +4 -0
  157. data/vendor/eac_templates/lib/eac_templates/version.rb +1 -1
  158. data/vendor/eac_templates/spec/rubocop_spec.rb +1 -1
  159. data/vendor/eac_templates/spec/spec_helper.rb +2 -100
  160. metadata +72 -198
  161. data/lib/avm/app_src.rb +0 -61
  162. data/lib/avm/fs_cache.rb +0 -11
  163. data/lib/avm/patches/object/fs_cache.rb +0 -16
  164. data/vendor/avm/lib/avm/files/info.rb +0 -24
  165. data/vendor/avm-apps/avm-apps.gemspec +0 -18
  166. data/vendor/avm-apps/lib/avm/apps/config.rb +0 -19
  167. data/vendor/avm-apps/lib/avm/apps/jobs/base.rb +0 -64
  168. data/vendor/avm-apps/lib/avm/apps/jobs/variables_source.rb +0 -24
  169. data/vendor/avm-apps/lib/avm/apps/jobs.rb +0 -11
  170. data/vendor/avm-apps/lib/avm/apps/sources/configuration/_locale.rb +0 -18
  171. data/vendor/avm-apps/lib/avm/apps/sources/configuration/_rubocop.rb +0 -26
  172. data/vendor/avm-apps/lib/avm/apps/sources/configuration/_tests.rb +0 -29
  173. data/vendor/avm-apps/lib/avm/apps/sources/configuration.rb +0 -57
  174. data/vendor/avm-apps/lib/avm/apps/version.rb +0 -7
  175. data/vendor/avm-apps/spec/rubocop_spec.rb +0 -3
  176. data/vendor/avm-apps/spec/spec_helper.rb +0 -103
  177. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/fs_cache.rb +0 -12
  178. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/conditional.rb +0 -35
  179. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/stubbed_ssh.rb +0 -44
@@ -1,102 +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__))
102
- end
3
+ require 'eac_ruby_utils/rspec/default_setup'
4
+ ::EacRubyUtils::Rspec.default_setup_create(::File.expand_path('..', __dir__))
@@ -13,7 +13,9 @@ Gem::Specification.new do |s|
13
13
  s.files = Dir['{lib}/**/*']
14
14
 
15
15
  s.add_dependency 'avm-eac_rails_base1', '~> 0.1'
16
+ s.add_dependency 'curb', '~> 0.9.10'
17
+ s.add_dependency 'eac_fs', '~> 0.4'
16
18
  s.add_dependency 'eac_ruby_utils', '~> 0.68'
17
19
 
18
- s.add_development_dependency 'eac_ruby_gem_support', '~> 0.2'
20
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.4'
19
21
  end
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'avm/eac_redmine_base0/core_update'
4
- require 'avm/cached_download'
5
4
  require 'avm/sync'
5
+ require 'eac_fs/cached_download'
6
6
  require 'eac_ruby_utils/core_ext'
7
7
 
8
8
  module Avm
@@ -79,8 +79,9 @@ module Avm
79
79
  .add_exclude('/*').add_includes(*target_files_to_remove).move_mode(true).run
80
80
  end
81
81
 
82
+ # @return [EacFs::CachedDownload]
82
83
  def source_package_uncached
83
- ::Avm::CachedDownload.new(url, ::Avm.fs_cache.child('eac_redmine_base0', 'core_update'))
84
+ ::EacFs::CachedDownload.new(url, fs_cache)
84
85
  end
85
86
 
86
87
  def validate_empty_dir
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRedmineBase0
5
- VERSION = '0.1.0'
5
+ VERSION = '0.2.2'
6
6
  end
7
7
  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,102 +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__))
102
- end
3
+ require 'eac_ruby_utils/rspec/default_setup'
4
+ ::EacRubyUtils::Rspec.default_setup_create(::File.expand_path('..', __dir__))
@@ -2,6 +2,7 @@ export postgresql_database='%%DATABASE.NAME%%'
2
2
  export postgresql_database_test='%%DATABASE.NAME%%_test'
3
3
  export postgresql_user='%%DATABASE.USERNAME%%'
4
4
  export postgresql_password='%%DATABASE.PASSWORD%%'
5
+ export postgresql_version='%%POSTGRESQL.VERSION%%'
5
6
  export rvm_ruby='ruby-%%RUBY.VERSION%%'
6
7
  export redmine_git_hosting_ssh_key_name=redmine_git_hosting_id
7
8
  if [ '%%WEB.SCHEME%%' == 'https' ]; then
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'eac_ruby_utils/core_ext'
4
- require 'avm/apps/jobs/base'
4
+ require 'avm/jobs/base'
5
5
  require 'avm/patches/object/template'
6
6
  require 'avm/eac_ubuntu_base0/apache'
7
7
  require 'avm/patches/object/template'
@@ -11,7 +11,7 @@ module Avm
11
11
  class ApacheHost
12
12
  JOBS = %w[write_available_no_ssl_site enable_no_ssl_site remove_ssl_site reload_apache
13
13
  run_certbot enable_ssl_site reload_apache].freeze
14
- include ::Avm::Apps::Jobs::Base
14
+ include ::Avm::Jobs::Base
15
15
 
16
16
  def no_ssl_site_content
17
17
  ::Avm::EacWebappBase0::ApacheHost
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/apps/jobs/base'
3
+ require 'avm/jobs/base'
4
4
  require 'avm/eac_ubuntu_base0/apache'
5
5
  require 'eac_ruby_utils/core_ext'
6
6
 
@@ -8,7 +8,7 @@ module Avm
8
8
  module EacWebappBase0
9
9
  class ApachePath
10
10
  JOBS = %w[write_available_conf enable_conf reload_apache].freeze
11
- include ::Avm::Apps::Jobs::Base
11
+ include ::Avm::Jobs::Base
12
12
 
13
13
  def content
14
14
  ::Avm::EacWebappBase0::ApachePath.template.child('default.conf').apply(variables_source)
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'active_support/callbacks'
4
- require 'avm/apps/jobs/base'
4
+ require 'avm/jobs/base'
5
5
  require 'avm/git'
6
6
  require 'avm/patches/object/template'
7
7
  require 'eac_ruby_utils/core_ext'
@@ -19,7 +19,7 @@ module Avm
19
19
  JOBS = (%w[create_build_dir build_content append_instance_content write_on_target
20
20
  setup_files_units assert_instance_branch] + [REQUEST_TEST_JOB]).freeze
21
21
 
22
- include ::Avm::Apps::Jobs::Base
22
+ include ::Avm::Jobs::Base
23
23
 
24
24
  lists.add_symbol :option, :appended_directories, :no_request_test, :reference
25
25
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacWebappBase0
5
- VERSION = '0.1.0'
5
+ VERSION = '0.1.1'
6
6
  end
7
7
  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,102 +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__))
102
- end
3
+ require 'eac_ruby_utils/rspec/default_setup'
4
+ ::EacRubyUtils::Rspec.default_setup_create(::File.expand_path('..', __dir__))
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
13
13
  s.files = Dir['{lib}/**/*', 'Gemfile']
14
14
 
15
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
+ s.add_dependency 'eac_config', '~> 0.5', '>= 0.5.1'
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
@@ -3,16 +3,19 @@
3
3
  require 'eac_ruby_utils/core_ext'
4
4
 
5
5
  module EacCli
6
- class Config
6
+ class Config < ::SimpleDelegator
7
7
  require_sub __FILE__
8
- attr_reader :sub
9
8
 
10
9
  def initialize(sub_node)
11
- @sub = sub_node
10
+ super(sub_node)
12
11
  end
13
12
 
14
13
  def entry(path, options = {})
15
14
  ::EacCli::Config::Entry.new(self, path, options)
16
15
  end
16
+
17
+ def sub
18
+ __getobj__
19
+ end
17
20
  end
18
21
  end
@@ -13,7 +13,7 @@ module EacCli
13
13
  repeat? ? previous_value + [new_value] : new_value
14
14
  end
15
15
 
16
- def default_value
16
+ def default_default_value
17
17
  repeat? ? [] : nil
18
18
  end
19
19
  end
@@ -18,7 +18,7 @@ module EacCli
18
18
 
19
19
  enable_listable
20
20
  enable_abstract_methods :build_value, :default_value
21
- lists.add_symbol :option, :optional, :usage, :repeat, :required
21
+ lists.add_symbol :option, :default, :optional, :usage, :repeat, :required
22
22
  common_constructor :short, :long, :description, :options, default: [{}] do
23
23
  raise 'Nor short neither long selector was set' if short.blank? && long.blank?
24
24
 
@@ -27,6 +27,14 @@ module EacCli
27
27
  )
28
28
  end
29
29
 
30
+ def default_value
31
+ default_value? ? options[OPTION_DEFAULT] : default_default_value
32
+ end
33
+
34
+ def default_value?
35
+ options.key?(OPTION_DEFAULT)
36
+ end
37
+
30
38
  def identifier
31
39
  [long, short].each do |v|
32
40
  v.to_s.if_present { |vv| return vv.variableize.to_sym }
@@ -14,6 +14,12 @@ module EacCli
14
14
  end
15
15
 
16
16
  def default_value
17
+ return super unless default_value?
18
+
19
+ raise "Unallowed default value for boolean options (Option: #{self})"
20
+ end
21
+
22
+ def default_default_value
17
23
  repeat? ? 0 : false
18
24
  end
19
25
  end
@@ -36,9 +36,9 @@ module EacCli
36
36
  end
37
37
 
38
38
  def option_definition(option)
39
- self.class.option_usage_full(option) + option.description.if_present('') do |v|
40
- OPTION_DESC_SEP + v
41
- end
39
+ [self.class.option_usage_full(option), option.description,
40
+ option.default_value? ? "[Default: \"#{option.default_value}\"]" : nil]
41
+ .reject(&:blank?).join(OPTION_DESC_SEP)
42
42
  end
43
43
 
44
44
  def section(header, include_header = true)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacCli
4
- VERSION = '0.22.1'
4
+ VERSION = '0.23.1'
5
5
  end
@@ -13,6 +13,7 @@ RSpec.describe ::EacCli::Runner do
13
13
  bool_opt '-p', '--opt2', 'A boolean option'
14
14
  arg_opt '-q', '--opt4', 'A repeatable argument option.', repeat: true
15
15
  bool_opt '-r', '--opt5', 'A repeatable boolean option', repeat: true
16
+ arg_opt '-s', '--opt6', 'A argument option with default value', default: 'DEFAULT'
16
17
  pos_arg :pos1
17
18
  pos_arg :pos2, repeat: true, optional: true
18
19
  alt do
@@ -28,9 +29,9 @@ RSpec.describe ::EacCli::Runner do
28
29
  let(:parsed_actual) { instance.parsed.to_h.symbolize_keys }
29
30
 
30
31
  context 'when all args are supplied' do
31
- let(:argv) { %w[--opt1 aaa --opt2 bbb ccc ddd] }
32
+ let(:argv) { %w[--opt1 aaa --opt2 bbb ccc ddd --opt6 6] }
32
33
  let(:parsed_expected) do
33
- { opt1: 'aaa', opt2: true, opt3: false, opt4: [], opt5: 0, pos1: 'bbb',
34
+ { opt1: 'aaa', opt2: true, opt3: false, opt4: [], opt5: 0, opt6: '6', pos1: 'bbb',
34
35
  pos2: %w[ccc ddd] }
35
36
  end
36
37
 
@@ -65,7 +66,7 @@ RSpec.describe ::EacCli::Runner do
65
66
  context 'when only required args are supplied' do
66
67
  let(:argv) { %w[bbb] }
67
68
  let(:parsed_expected) do
68
- { opt1: nil, opt2: false, opt3: false, opt4: [], opt5: 0, pos1: 'bbb',
69
+ { opt1: nil, opt2: false, opt3: false, opt4: [], opt5: 0, opt6: 'DEFAULT', pos1: 'bbb',
69
70
  pos2: [] }
70
71
  end
71
72
 
@@ -87,7 +88,7 @@ RSpec.describe ::EacCli::Runner do
87
88
  context 'when alternative args are supplied' do
88
89
  let(:argv) { %w[--opt3] }
89
90
  let(:parsed_expected) do
90
- { opt1: nil, opt2: false, opt3: true, opt4: [], opt5: 0, pos1: nil,
91
+ { opt1: nil, opt2: false, opt3: true, opt4: [], opt5: 0, opt6: 'DEFAULT', pos1: nil,
91
92
  pos2: [] }
92
93
  end
93
94
 
@@ -98,7 +99,7 @@ RSpec.describe ::EacCli::Runner do
98
99
  context 'when repeated options are supplied' do
99
100
  let(:argv) { %w[--opt5 -rrr --opt4=A -q B --opt4 C AAA] }
100
101
  let(:parsed_expected) do
101
- { opt1: nil, opt2: false, opt3: false, opt4: %w[A B C], opt5: 4, pos1: 'AAA',
102
+ { opt1: nil, opt2: false, opt3: false, opt4: %w[A B C], opt5: 4, opt6: 'DEFAULT', pos1: 'AAA',
102
103
  pos2: [] }
103
104
  end
104
105
 
@@ -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