ehbrs-tools 0.22.0 → 0.25.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/exe/ehbrs +2 -2
  3. data/lib/ehbrs/tools/runner.rb +21 -0
  4. data/lib/ehbrs/tools/runner/cooking_book.rb +32 -0
  5. data/lib/ehbrs/tools/runner/cooking_book/build.rb +52 -0
  6. data/lib/ehbrs/{runner/videos/series.rb → tools/runner/finances.rb} +4 -4
  7. data/lib/ehbrs/tools/runner/finances/bb_browser.rb +66 -0
  8. data/lib/ehbrs/tools/runner/fs.rb +18 -0
  9. data/lib/ehbrs/tools/runner/fs/selected.rb +81 -0
  10. data/lib/ehbrs/tools/runner/fs/used_space.rb +161 -0
  11. data/lib/ehbrs/tools/runner/google.rb +18 -0
  12. data/lib/ehbrs/tools/runner/google/translate.rb +89 -0
  13. data/lib/ehbrs/tools/runner/music.rb +18 -0
  14. data/lib/ehbrs/tools/runner/music/selected.rb +28 -0
  15. data/lib/ehbrs/tools/runner/self.rb +18 -0
  16. data/lib/ehbrs/tools/runner/self/test.rb +27 -0
  17. data/lib/ehbrs/tools/runner/telegram.rb +28 -0
  18. data/lib/ehbrs/tools/runner/telegram/send_message.rb +31 -0
  19. data/lib/ehbrs/tools/runner/vg.rb +18 -0
  20. data/lib/ehbrs/tools/runner/vg/ips.rb +134 -0
  21. data/lib/ehbrs/tools/runner/vg/wii.rb +74 -0
  22. data/lib/ehbrs/{runner/web_utils → tools/runner}/videos.rb +3 -3
  23. data/lib/ehbrs/tools/runner/videos/extract.rb +70 -0
  24. data/lib/ehbrs/tools/runner/videos/probe.rb +34 -0
  25. data/lib/ehbrs/tools/runner/videos/series.rb +20 -0
  26. data/lib/ehbrs/tools/runner/videos/series/rename.rb +74 -0
  27. data/lib/ehbrs/tools/runner/videos/unsupported.rb +61 -0
  28. data/lib/ehbrs/tools/runner/web_utils.rb +26 -0
  29. data/lib/ehbrs/tools/runner/web_utils/videos.rb +20 -0
  30. data/lib/ehbrs/tools/runner/web_utils/videos/download.rb +75 -0
  31. data/lib/ehbrs/tools/runner/web_utils/videos/upload.rb +77 -0
  32. data/lib/ehbrs/tools/version.rb +1 -1
  33. data/lib/ehbrs/vg/wii/game_file.rb +10 -0
  34. data/vendor/aranha-parsers/aranha-parsers.gemspec +2 -2
  35. data/vendor/{avm-apps/lib/avm/apps/jobs.rb → aranha-parsers/lib/aranha/parsers/rspec.rb} +3 -3
  36. data/vendor/aranha-parsers/lib/aranha/parsers/rspec/setup.rb +15 -0
  37. data/vendor/aranha-parsers/lib/aranha/parsers/{spec → rspec}/source_target_fixtures_example.rb +0 -0
  38. data/vendor/aranha-parsers/lib/aranha/parsers/source_address.rb +10 -8
  39. data/vendor/aranha-parsers/lib/aranha/parsers/version.rb +1 -1
  40. data/vendor/aranha-parsers/spec/lib/rubocop_check_spec.rb +1 -5
  41. data/vendor/aranha-parsers/spec/spec_helper.rb +2 -6
  42. data/vendor/aranha-selenium/aranha-selenium.gemspec +2 -2
  43. data/vendor/aranha-selenium/lib/aranha/selenium/version.rb +1 -1
  44. data/vendor/aranha-selenium/spec/rubocop_check_spec.rb +1 -5
  45. data/vendor/aranha-selenium/spec/spec_helper.rb +2 -98
  46. data/vendor/eac_cli/eac_cli.gemspec +3 -3
  47. data/vendor/eac_cli/lib/eac_cli/config.rb +2 -0
  48. data/vendor/eac_cli/lib/eac_cli/config/entry.rb +1 -3
  49. data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
  50. data/vendor/eac_cli/spec/rubocop_spec.rb +1 -1
  51. data/vendor/eac_cli/spec/spec_helper.rb +2 -101
  52. data/vendor/eac_config/eac_config.gemspec +2 -2
  53. data/vendor/eac_config/lib/eac_config/version.rb +1 -1
  54. data/vendor/eac_config/spec/rubocop_spec.rb +1 -1
  55. data/vendor/eac_config/spec/spec_helper.rb +2 -15
  56. data/vendor/eac_docker/eac_docker.gemspec +2 -2
  57. data/vendor/eac_docker/lib/eac_docker/container.rb +7 -3
  58. data/vendor/eac_docker/lib/eac_docker/debug.rb +15 -0
  59. data/vendor/eac_docker/lib/eac_docker/images/coded.rb +4 -0
  60. data/vendor/eac_docker/lib/eac_docker/images/templatized.rb +16 -2
  61. data/vendor/eac_docker/lib/eac_docker/rspec.rb +2 -10
  62. data/vendor/eac_docker/lib/eac_docker/rspec/setup.rb +17 -0
  63. data/vendor/eac_docker/lib/eac_docker/version.rb +1 -1
  64. data/vendor/eac_docker/spec/rubocop_spec.rb +1 -1
  65. data/vendor/eac_docker/spec/spec_helper.rb +2 -104
  66. data/vendor/eac_ruby_base0/eac_ruby_base0.gemspec +4 -4
  67. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
  68. data/vendor/eac_ruby_base0/spec/rubocop_spec.rb +1 -1
  69. data/vendor/eac_ruby_base0/spec/spec_helper.rb +2 -101
  70. data/vendor/eac_ruby_utils/eac_ruby_utils.gemspec +1 -1
  71. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/boolean.rb +1 -1
  72. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/executable.rb +15 -3
  73. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/gems_registry.rb +35 -0
  74. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/gems_registry/gem.rb +75 -0
  75. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/parent_n.rb +11 -0
  76. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/recursive_builder.rb +51 -0
  77. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/default_setup.rb +20 -0
  78. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup.rb +12 -0
  79. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup/conditionals.rb +17 -0
  80. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup_manager.rb +49 -0
  81. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  82. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/parent_n_spec.rb +33 -0
  83. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/recursive_builder_spec.rb +65 -0
  84. data/vendor/eac_ruby_utils/spec/rubocop_check_spec.rb +1 -1
  85. data/vendor/eac_ruby_utils/spec/spec_helper.rb +6 -6
  86. data/vendor/ehbrs_ruby_utils/ehbrs_ruby_utils.gemspec +4 -2
  87. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/finances/bb_browser/docker_image.rb +18 -0
  88. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/patches/object/template.rb +6 -0
  89. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/version.rb +1 -1
  90. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/stream.rb +11 -1
  91. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/web_utils/videos/file.rb +11 -8
  92. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/web_utils/videos/file/rename.rb +28 -0
  93. data/vendor/ehbrs_ruby_utils/spec/lib/ehbrs_ruby_utils/videos/stream_spec.rb +13 -0
  94. data/vendor/ehbrs_ruby_utils/spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_attachment.source.yaml +28 -0
  95. data/vendor/ehbrs_ruby_utils/spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_attachment.target.yaml +7 -0
  96. data/vendor/ehbrs_ruby_utils/spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_audio.source.yaml +49 -0
  97. data/vendor/ehbrs_ruby_utils/spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_audio.target.yaml +7 -0
  98. data/vendor/ehbrs_ruby_utils/spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_subtitle.source.yaml +43 -0
  99. data/vendor/ehbrs_ruby_utils/spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_subtitle.target.yaml +7 -0
  100. data/vendor/ehbrs_ruby_utils/spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_video.source.yaml +59 -0
  101. data/vendor/ehbrs_ruby_utils/spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_video.target.yaml +7 -0
  102. data/vendor/ehbrs_ruby_utils/spec/rubocop_check_spec.rb +1 -5
  103. data/vendor/ehbrs_ruby_utils/spec/spec_helper.rb +2 -98
  104. data/vendor/ehbrs_ruby_utils/template/ehbrs_ruby_utils/finances/bb_browser/docker_image/Dockerfile +44 -0
  105. data/vendor/ehbrs_ruby_utils/template/ehbrs_ruby_utils/finances/bb_browser/docker_image/Makefile +35 -0
  106. data/vendor/ehbrs_ruby_utils/template/ehbrs_ruby_utils/finances/bb_browser/docker_image/README.md +16 -0
  107. data/vendor/ehbrs_ruby_utils/template/ehbrs_ruby_utils/finances/bb_browser/docker_image/context/firefox.service +8 -0
  108. data/vendor/ehbrs_ruby_utils/template/ehbrs_ruby_utils/finances/bb_browser/docker_image/context/startbrowser.sh +9 -0
  109. metadata +68 -53
  110. data/lib/ehbrs/runner.rb +0 -19
  111. data/lib/ehbrs/runner/cooking_book.rb +0 -30
  112. data/lib/ehbrs/runner/cooking_book/build.rb +0 -50
  113. data/lib/ehbrs/runner/finances.rb +0 -16
  114. data/lib/ehbrs/runner/finances/bb_browser.rb +0 -35
  115. data/lib/ehbrs/runner/fs.rb +0 -16
  116. data/lib/ehbrs/runner/fs/selected.rb +0 -79
  117. data/lib/ehbrs/runner/fs/used_space.rb +0 -159
  118. data/lib/ehbrs/runner/google.rb +0 -16
  119. data/lib/ehbrs/runner/google/translate.rb +0 -87
  120. data/lib/ehbrs/runner/music.rb +0 -16
  121. data/lib/ehbrs/runner/music/selected.rb +0 -26
  122. data/lib/ehbrs/runner/self.rb +0 -16
  123. data/lib/ehbrs/runner/self/test.rb +0 -25
  124. data/lib/ehbrs/runner/telegram.rb +0 -26
  125. data/lib/ehbrs/runner/telegram/send_message.rb +0 -29
  126. data/lib/ehbrs/runner/vg.rb +0 -16
  127. data/lib/ehbrs/runner/vg/ips.rb +0 -132
  128. data/lib/ehbrs/runner/vg/wii.rb +0 -72
  129. data/lib/ehbrs/runner/videos.rb +0 -16
  130. data/lib/ehbrs/runner/videos/extract.rb +0 -68
  131. data/lib/ehbrs/runner/videos/probe.rb +0 -32
  132. data/lib/ehbrs/runner/videos/series/rename.rb +0 -72
  133. data/lib/ehbrs/runner/videos/unsupported.rb +0 -59
  134. data/lib/ehbrs/runner/web_utils.rb +0 -24
  135. data/lib/ehbrs/runner/web_utils/videos/download.rb +0 -63
  136. data/lib/ehbrs/runner/web_utils/videos/upload.rb +0 -75
  137. data/vendor/avm-apps/Gemfile +0 -5
  138. data/vendor/avm-apps/avm-apps.gemspec +0 -18
  139. data/vendor/avm-apps/lib/avm/apps.rb +0 -9
  140. data/vendor/avm-apps/lib/avm/apps/config.rb +0 -19
  141. data/vendor/avm-apps/lib/avm/apps/jobs/base.rb +0 -64
  142. data/vendor/avm-apps/lib/avm/apps/jobs/variables_source.rb +0 -24
  143. data/vendor/avm-apps/lib/avm/apps/sources/configuration.rb +0 -57
  144. data/vendor/avm-apps/lib/avm/apps/sources/configuration/_locale.rb +0 -18
  145. data/vendor/avm-apps/lib/avm/apps/sources/configuration/_rubocop.rb +0 -26
  146. data/vendor/avm-apps/lib/avm/apps/sources/configuration/_tests.rb +0 -29
  147. data/vendor/avm-apps/lib/avm/apps/version.rb +0 -7
  148. data/vendor/avm-apps/spec/rubocop_spec.rb +0 -3
  149. data/vendor/avm-apps/spec/spec_helper.rb +0 -103
  150. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/conditional.rb +0 -35
  151. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/stubbed_ssh.rb +0 -44
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ehbrs
4
4
  module Tools
5
- VERSION = '0.22.0'
5
+ VERSION = '0.25.0'
6
6
  end
7
7
  end
@@ -20,8 +20,10 @@ module Ehbrs
20
20
  D: :disc_number,
21
21
  e: :extname,
22
22
  i: :id6,
23
+ m: :normalized_disc_name,
23
24
  n: :disc_name,
24
25
  N: :nintendont_basename,
26
+ s: :sanitized_disc_name,
25
27
  t: :database_title,
26
28
  T: :disc_type
27
29
  )
@@ -46,6 +48,10 @@ module Ehbrs
46
48
  FORMAT.format(string).with(self)
47
49
  end
48
50
 
51
+ def normalized_disc_name
52
+ sanitized_disc_name.downcase
53
+ end
54
+
49
55
  def nintendont_basename
50
56
  n = disc_number
51
57
  n == 1 ? 'game' : "disc#{n}"
@@ -55,6 +61,10 @@ module Ehbrs
55
61
  properties.fetch('Disc & part IDs/disc')
56
62
  end
57
63
 
64
+ def sanitized_disc_name
65
+ ::ActiveSupport::Inflector.transliterate(disc_name).gsub(/[^0-9a-z ]/i, '')
66
+ end
67
+
58
68
  def valid?
59
69
  properties.present?
60
70
  end
@@ -15,9 +15,9 @@ Gem::Specification.new do |s|
15
15
  s.add_dependency 'activesupport', '>= 4.0.0'
16
16
  s.add_dependency 'addressable', '~> 2.7'
17
17
  s.add_dependency 'curb', '~> 0.9.10'
18
- s.add_dependency 'eac_ruby_utils', '~> 0.33', '>= 0.33.1'
18
+ s.add_dependency 'eac_ruby_utils', '~> 0.74'
19
19
  s.add_dependency 'httpclient', '~> 2.8', '>= 2.8.3'
20
20
  s.add_dependency 'ofx-parser', '~> 1.1.0'
21
21
 
22
- s.add_development_dependency 'eac_ruby_gem_support', '~> 0.1'
22
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.3', '>= 0.3.3'
23
23
  end
@@ -2,9 +2,9 @@
2
2
 
3
3
  require 'eac_ruby_utils/core_ext'
4
4
 
5
- module Avm
6
- module Apps
7
- module Jobs
5
+ module Aranha
6
+ module Parsers
7
+ module Rspec
8
8
  require_sub __FILE__
9
9
  end
10
10
  end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Aranha
6
+ module Parsers
7
+ module Rspec
8
+ module Setup
9
+ def self.extended(_setup_obj)
10
+ require 'aranha/parsers/rspec/source_target_fixtures_example'
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -1,13 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'active_support/core_ext/module/delegation'
4
- require 'eac_ruby_utils/require_sub'
4
+ require 'eac_ruby_utils/core_ext'
5
5
  require 'yaml'
6
6
 
7
7
  module Aranha
8
8
  module Parsers
9
9
  class SourceAddress
10
- ::EacRubyUtils.require_sub __FILE__
10
+ require_sub __FILE__
11
11
 
12
12
  class << self
13
13
  SUBS = [
@@ -35,12 +35,8 @@ module Aranha
35
35
  end
36
36
  end
37
37
 
38
- attr_reader :sub
39
-
40
- def initialize(source)
41
- @sub = self.class.detect_sub(source)
42
- end
43
-
38
+ enable_simple_cache
39
+ common_constructor :source
44
40
  delegate :content, :url, to: :sub
45
41
 
46
42
  def to_s
@@ -50,6 +46,12 @@ module Aranha
50
46
  def serialize
51
47
  sub.serialize.strip + "\n"
52
48
  end
49
+
50
+ private
51
+
52
+ def sub_uncached
53
+ self.class.detect_sub(source)
54
+ end
53
55
  end
54
56
  end
55
57
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Aranha
4
4
  module Parsers
5
- VERSION = '0.7.0'
5
+ VERSION = '0.8.3'
6
6
  end
7
7
  end
@@ -1,7 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_ruby_gem_support/spec/examples/rubocop_check'
4
-
5
- RSpec.describe ::RuboCop do
6
- include_examples 'rubocop_check', ::File.expand_path('../..', __dir__)
7
- end
3
+ ::EacRubyUtils::Rspec.default_setup.describe_rubocop
@@ -1,8 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- $LOAD_PATH.push File.expand_path('../lib', __dir__)
4
- require 'tmpdir'
5
-
6
- RSpec.configure do |config|
7
- config.example_status_persistence_file_path = ::File.join(::Dir.tmpdir, 'aranha-parsers_rspec')
8
- end
3
+ require 'eac_ruby_utils/rspec/default_setup'
4
+ ::EacRubyUtils::Rspec.default_setup_create(::File.expand_path('..', __dir__))
@@ -12,8 +12,8 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib}/**/*', 'Gemfile']
14
14
 
15
- s.add_dependency 'activesupport'
15
+ s.add_dependency 'eac_ruby_utils', '~> 0.70'
16
16
  s.add_dependency 'selenium-webdriver', '~> 3.142', '>= 3.142.3'
17
17
 
18
- s.add_development_dependency 'eac_ruby_gem_support', '~> 0.1', '>= 0.1.1'
18
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.3'
19
19
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Aranha
4
4
  module Selenium
5
- VERSION = '0.2.0'
5
+ VERSION = '0.2.2'
6
6
  end
7
7
  end
@@ -1,7 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_ruby_gem_support/spec/examples/rubocop_check'
4
-
5
- RSpec.describe ::RuboCop do
6
- include_examples 'rubocop_check', ::File.expand_path('..', __dir__)
7
- end
3
+ ::EacRubyUtils::Rspec.default_setup.describe_rubocop
@@ -1,100 +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
- 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
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'eac_ruby_utils/core_ext'
4
+
3
5
  module EacCli
4
6
  class Config
5
7
  require_sub __FILE__
@@ -21,12 +21,10 @@ module EacCli
21
21
  return sub_value_to_return if sub_entry.found?
22
22
  return nil unless options.required?
23
23
 
24
- puts "|#{sub_entry.path}|"
25
-
26
24
  input_value
27
25
  end
28
26
 
29
- delegate :value=, to: :sub_entry
27
+ delegate :found?, :value=, to: :sub_entry
30
28
 
31
29
  private
32
30
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacCli
4
- VERSION = '0.21.1'
4
+ VERSION = '0.22.2'
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__))