avm-tools 0.104.0 → 0.105.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avm/launcher/context/instance_collector.rb +46 -0
  3. data/lib/avm/launcher/instances/runner_helper.rb +21 -15
  4. data/lib/avm/launcher/paths/logical.rb +5 -0
  5. data/lib/avm/tools/runner/launcher/instances.rb +7 -5
  6. data/lib/avm/tools/runner/launcher/projects.rb +2 -4
  7. data/lib/avm/tools/runner/launcher/publish.rb +2 -6
  8. data/lib/avm/tools/version.rb +1 -1
  9. data/vendor/avm/lib/avm/version.rb +1 -1
  10. data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec.rb +0 -1
  11. data/vendor/avm/spec/rubocop_spec.rb +1 -1
  12. data/vendor/avm/spec/spec_helper.rb +2 -17
  13. data/vendor/avm-apps/lib/avm/apps/version.rb +1 -1
  14. data/vendor/avm-apps/spec/rubocop_spec.rb +1 -1
  15. data/vendor/avm-apps/spec/spec_helper.rb +2 -101
  16. data/vendor/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/version.rb +1 -1
  17. data/vendor/avm-eac_asciidoctor_base0/spec/rubocop_spec.rb +1 -1
  18. data/vendor/avm-eac_asciidoctor_base0/spec/spec_helper.rb +2 -100
  19. data/vendor/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
  20. data/vendor/avm-eac_rails_base1/spec/rubocop_spec.rb +1 -1
  21. data/vendor/avm-eac_rails_base1/spec/spec_helper.rb +2 -100
  22. data/vendor/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +1 -1
  23. data/vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
  24. data/vendor/avm-eac_redmine_base0/spec/rubocop_spec.rb +1 -1
  25. data/vendor/avm-eac_redmine_base0/spec/spec_helper.rb +2 -100
  26. data/vendor/avm-eac_redmine_base0/template/avm/eac_redmine_base0/deploy/config/install.sh.template +1 -0
  27. data/vendor/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
  28. data/vendor/avm-eac_webapp_base0/spec/rubocop_spec.rb +1 -1
  29. data/vendor/avm-eac_webapp_base0/spec/spec_helper.rb +2 -100
  30. data/vendor/eac_cli/eac_cli.gemspec +3 -3
  31. data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
  32. data/vendor/eac_cli/spec/rubocop_spec.rb +1 -1
  33. data/vendor/eac_cli/spec/spec_helper.rb +2 -101
  34. data/vendor/eac_config/eac_config.gemspec +2 -2
  35. data/vendor/eac_config/lib/eac_config/version.rb +1 -1
  36. data/vendor/eac_config/spec/rubocop_spec.rb +1 -1
  37. data/vendor/eac_config/spec/spec_helper.rb +2 -15
  38. data/vendor/eac_docker/eac_docker.gemspec +2 -2
  39. data/vendor/eac_docker/lib/eac_docker/container.rb +7 -3
  40. data/vendor/eac_docker/lib/eac_docker/images/templatized.rb +4 -0
  41. data/vendor/eac_docker/lib/eac_docker/rspec/setup.rb +17 -0
  42. data/vendor/eac_docker/lib/eac_docker/rspec.rb +2 -10
  43. data/vendor/eac_docker/lib/eac_docker/version.rb +1 -1
  44. data/vendor/eac_docker/spec/rubocop_spec.rb +1 -1
  45. data/vendor/eac_docker/spec/spec_helper.rb +2 -104
  46. data/vendor/eac_git/eac_git.gemspec +3 -3
  47. data/vendor/eac_git/lib/eac_git/rspec/setup.rb +23 -0
  48. data/vendor/eac_git/lib/eac_git/rspec.rb +1 -14
  49. data/vendor/eac_git/lib/eac_git/version.rb +1 -1
  50. data/vendor/eac_git/spec/rubocop_spec.rb +1 -1
  51. data/vendor/eac_git/spec/spec_helper.rb +2 -104
  52. data/vendor/eac_ruby_base0/eac_ruby_base0.gemspec +4 -4
  53. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
  54. data/vendor/eac_ruby_base0/spec/rubocop_spec.rb +1 -1
  55. data/vendor/eac_ruby_base0/spec/spec_helper.rb +2 -101
  56. data/vendor/eac_ruby_gems_utils/eac_ruby_gems_utils.gemspec +2 -2
  57. data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/version.rb +1 -1
  58. data/vendor/eac_ruby_gems_utils/spec/code/rubocop_check_spec.rb +1 -1
  59. data/vendor/eac_ruby_gems_utils/spec/spec_helper.rb +2 -101
  60. data/vendor/eac_ruby_utils/eac_ruby_utils.gemspec +1 -1
  61. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/executable.rb +15 -3
  62. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/gems_registry/gem.rb +75 -0
  63. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/gems_registry.rb +35 -0
  64. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/recursive_builder.rb +51 -0
  65. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/default_setup.rb +20 -0
  66. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup/conditionals.rb +17 -0
  67. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup.rb +12 -0
  68. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup_manager.rb +49 -0
  69. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  70. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/recursive_builder_spec.rb +65 -0
  71. data/vendor/eac_ruby_utils/spec/rubocop_check_spec.rb +1 -1
  72. data/vendor/eac_ruby_utils/spec/spec_helper.rb +6 -6
  73. data/vendor/eac_templates/lib/eac_templates/version.rb +1 -1
  74. data/vendor/eac_templates/spec/rubocop_spec.rb +1 -1
  75. data/vendor/eac_templates/spec/spec_helper.rb +2 -100
  76. metadata +13 -5
  77. data/lib/avm/eac_asciidoctor_base0.rb +0 -9
  78. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/conditional.rb +0 -35
  79. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/stubbed_ssh.rb +0 -44
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4585c23cae62880e31d062cc01fbef21cd4736371756e717eaef78ddf16291bc
4
- data.tar.gz: 7f45edf7e390d0ca3fbaf0de62ce51820090d9fc1fe5e692b9e6c0a6624efb3a
3
+ metadata.gz: 3fe2686915966fcba0a1a718e139ea1e4ba92ee4c8f26ddb99abbe550e490061
4
+ data.tar.gz: a6a2010d4a8cf1a3647641669e967268a09a93ef993625a19407aae1d7ec9ecc
5
5
  SHA512:
6
- metadata.gz: 1fa3e825fae8f70e9defcb19e44252ecd10872cf250fe043dfb8a6e40a5ccd12f6ce159f94afe602ad23a435e2e8ed84381d165f6498cb85ecfb6cdd3efe9033
7
- data.tar.gz: 426f5496fe6e1701dc078f02ccd038d932a09fc362da23a89c9ce1e883ba0a515e1562031d0faaf0c817717a4fc92899af8820484297e0b183f860df33036f8d
6
+ metadata.gz: 21e08baec23bb4811d5ee4db550dd2b15909f26e02d40ca610f86e651194dcc6ccf19b91d82f9c0fa5b2cfe3c17a8ee8c37459a2e433d831e9a26f2748475e47
7
+ data.tar.gz: f150f90534d39728ec14e9ada47b2a0e13522b47218984447832075ee3876c20dad0cddf5bc11ee7c899eb06e49c7b6845354fb631c06affc439b5b72bfe0e23
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module Launcher
7
+ class Context
8
+ class InstanceCollector
9
+ common_constructor :context
10
+
11
+ def add_all
12
+ instances_set.merge(context.instances)
13
+ self
14
+ end
15
+
16
+ def add_path(path)
17
+ instances_set.merge(instances_on_path(path))
18
+ self
19
+ end
20
+
21
+ def add_pending
22
+ instances_set.merge(context.pending_instances)
23
+ self
24
+ end
25
+
26
+ def instances
27
+ instances_set.sort
28
+ end
29
+
30
+ private
31
+
32
+ def instance_match?(instance, instance_name)
33
+ ::File.fnmatch?(instance_name, instance.name)
34
+ end
35
+
36
+ def instances_on_path(path)
37
+ context.instances.select { |instance| instance_match?(instance, path) }
38
+ end
39
+
40
+ def instances_set
41
+ @instances_set ||= ::Set.new
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
@@ -1,31 +1,33 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'avm/launcher/context'
3
4
  require 'avm/tools/core_ext'
5
+ require 'avm/launcher/context/instance_collector'
4
6
 
5
7
  module Avm
6
8
  module Launcher
7
9
  module Instances
8
- class RunnerHelper
9
- def context
10
- @context ||= ::Avm::Launcher::Context.current
11
- end
10
+ module RunnerHelper
11
+ common_concern do
12
+ runner_definition do
13
+ bool_opt '--all', 'Select all instances.'
14
+ bool_opt '--pending', 'Select pending instances.'
15
+ bool_opt '--recache', 'Rewrite instances cache.'
16
+ end
12
17
 
13
- def find_instances(instance_name)
14
- context.instances.select { |instance| instance_match?(instance, instance_name) }
18
+ set_callback :run, :before, :setup_cache
15
19
  end
16
20
 
17
- def instance_match?(instance, instance_name)
18
- ::File.fnmatch?(instance_name, instance.name)
21
+ def context
22
+ @context ||= ::Avm::Launcher::Context.current
19
23
  end
20
24
 
21
25
  def instances
22
- if parsed.all?
23
- context.instances
24
- elsif parsed.pending?
25
- context.pending_instances
26
- else
27
- parsed.instance_path.flat_map { |p| find_instances(p) }
28
- end
26
+ collector = ::Avm::Launcher::Context::InstanceCollector.new(context)
27
+ collector.add_all if parsed.all?
28
+ collector.add_pending if parsed.pending?
29
+ parsed.instance_path.flat_map { |p| collector.add_path(p) }
30
+ collector.instances
29
31
  end
30
32
 
31
33
  def instance_stereotypes(instance)
@@ -35,6 +37,10 @@ module Avm
35
37
  def instance_label(instance)
36
38
  "#{instance.name} [#{instance_stereotypes(instance)}]"
37
39
  end
40
+
41
+ def setup_cache
42
+ ::Avm::Launcher::Context.current.recache = parsed.recache?
43
+ end
38
44
  end
39
45
  end
40
46
  end
@@ -7,6 +7,7 @@ module Avm
7
7
  module Launcher
8
8
  module Paths
9
9
  class Logical
10
+ include ::Comparable
10
11
  include ::EacRubyUtils::SimpleCache
11
12
 
12
13
  class << self
@@ -25,6 +26,10 @@ module Avm
25
26
  @logical = logical
26
27
  end
27
28
 
29
+ def <=>(other)
30
+ [logical, real] <=> [other.logical, other.real]
31
+ end
32
+
28
33
  def to_s
29
34
  logical
30
35
  end
@@ -6,16 +6,14 @@ module Avm
6
6
  module Tools
7
7
  class Runner
8
8
  class Launcher
9
- class Instances < ::Avm::Launcher::Instances::RunnerHelper
10
- runner_with :help do
9
+ class Instances
10
+ runner_with :help, ::Avm::Launcher::Instances::RunnerHelper do
11
11
  desc 'Mostra informações sobre instâncias.'
12
- bool_opt '--recache', 'Rewrite instances cache.'
13
- bool_opt '--all', 'Get all instances.'
12
+ bool_opt '-e', '--extra', 'Show instances\' extra data.'
14
13
  pos_arg :instance_path, repeat: true, optional: true
15
14
  end
16
15
 
17
16
  def run
18
- ::Avm::Launcher::Context.current.recache = parsed.recache?
19
17
  instances.each { |i| show_instance(i) }
20
18
  end
21
19
 
@@ -23,6 +21,10 @@ module Avm
23
21
 
24
22
  def show_instance(instance)
25
23
  puts instance_label(instance)
24
+ show_instance_extra(instance) if parsed.extra?
25
+ end
26
+
27
+ def show_instance_extra(instance)
26
28
  infov(' * Parent', (instance.parent ? instance_label(instance.parent) : '-'))
27
29
  infov(' * Git current revision', instance.options.git_current_revision)
28
30
  infov(' * Git publish remote', instance.options.git_publish_remote)
@@ -7,15 +7,13 @@ module Avm
7
7
  module Tools
8
8
  class Runner
9
9
  class Launcher
10
- class Projects < ::Avm::Launcher::Instances::RunnerHelper
11
- runner_with :help do
10
+ class Projects
11
+ runner_with :help, ::Avm::Launcher::Instances::RunnerHelper do
12
12
  desc 'Shows available projects.'
13
- bool_opt '--recache', 'Rewrite instances cache.'
14
13
  bool_opt '-i', '--instances', 'Show instances.'
15
14
  end
16
15
 
17
16
  def run
18
- ::Avm::Launcher::Context.current.recache = parsed.recache?
19
17
  ::Avm::Launcher::Context.current.projects.each do |p|
20
18
  show_project(p)
21
19
  end
@@ -6,21 +6,17 @@ module Avm
6
6
  module Tools
7
7
  class Runner
8
8
  class Launcher
9
- class Publish < ::Avm::Launcher::Instances::RunnerHelper
10
- runner_with :help do
9
+ class Publish
10
+ runner_with :help, ::Avm::Launcher::Instances::RunnerHelper do
11
11
  desc 'Publica projetos ou instâncias.'
12
- bool_opt '--all', 'Get all instances.'
13
12
  bool_opt '-d', '--dry-run', '"Dry run" publishing.'
14
13
  bool_opt '--new', 'Publish projects not published before.'
15
- bool_opt '--pending', 'Publish only pending.'
16
- bool_opt '--recache', 'Rewrite instances cache.'
17
14
  bool_opt '--run', 'Confirm publishing.'
18
15
  arg_opt '-s', '--stereotype', 'Publish only for stereotype <stereotype>.'
19
16
  pos_arg :instance_path, repeat: true, optional: true
20
17
  end
21
18
 
22
19
  def run
23
- ::Avm::Launcher::Context.current.recache = parsed.recache?
24
20
  build_publish_options
25
21
  instances.each do |i|
26
22
  next unless i.options.publishable?
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Tools
5
- VERSION = '0.104.0'
5
+ VERSION = '0.105.0'
6
6
  end
7
7
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Avm
4
- VERSION = '0.3.0'
4
+ VERSION = '0.3.1'
5
5
  end
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'aranha/parsers/spec/source_target_fixtures_example'
4
3
  require 'avm/git/commit/diff_tree_line'
5
4
 
6
5
  RSpec.describe ::Avm::Git::Commit::DiffTreeLine, git: true do
@@ -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,19 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- RSpec.configure do |config|
4
- config.expect_with :rspec do |expectations|
5
- expectations.include_chain_clauses_in_custom_matcher_descriptions = true
6
- end
7
-
8
- config.mock_with :rspec do |mocks|
9
- mocks.verify_partial_doubles = true
10
- end
11
-
12
- config.shared_context_metadata_behavior = :apply_to_host_groups
13
-
14
- require 'eac_ruby_gem_support/rspec'
15
- ::EacRubyGemSupport::Rspec.setup(::File.expand_path('..', __dir__))
16
- end
17
-
18
- require 'eac_git/rspec'
19
- ::EacGit::Rspec.configure
3
+ require 'eac_ruby_utils/rspec/default_setup'
4
+ ::EacRubyUtils::Rspec.default_setup_create(::File.expand_path('..', __dir__))
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Apps
5
- VERSION = '0.4.0'
5
+ VERSION = '0.4.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,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__))
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacAsciidoctorBase0
5
- VERSION = '0.3.0'
5
+ VERSION = '0.3.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__))