ehbrs-tools 0.28.2 → 0.28.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +51 -17
- data/lib/ehbrs/tools/runner/fs/selected.rb +1 -1
- data/lib/ehbrs/tools/runner/vg/wii.rb +2 -2
- data/lib/ehbrs/tools/runner/videos/series/rename.rb +1 -1
- data/lib/ehbrs/tools/version.rb +1 -1
- data/lib/ehbrs/videos/unsupported/search.rb +2 -2
- data/vendor/aranha-parsers/aranha-parsers.gemspec +1 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/base.rb +3 -1
- data/vendor/aranha-parsers/lib/aranha/parsers/html/node/default/numeric_support.rb +70 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/html/node/default/string_support.rb +77 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/html/node/default.rb +2 -94
- data/vendor/aranha-parsers/lib/aranha/parsers/json/base.rb +20 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/json.rb +11 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/source_address/http_get.rb +12 -15
- data/vendor/aranha-parsers/lib/aranha/parsers/version.rb +1 -1
- data/vendor/eac_fs/lib/eac_fs/patches/object/fs_cache.rb +4 -2
- data/vendor/eac_fs/lib/eac_fs/traversable.rb +45 -0
- data/vendor/eac_fs/lib/eac_fs/traverser.rb +76 -0
- data/vendor/eac_fs/lib/eac_fs/version.rb +1 -1
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/application.rb +1 -1
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with/confirmation.rb +0 -1
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with/filesystem_traverser.rb +2 -2
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
- data/vendor/eac_ruby_gems_utils/eac_ruby_gems_utils.gemspec +1 -1
- data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/base.rb +0 -1
- data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/version.rb +1 -1
- data/vendor/eac_ruby_gems_utils/spec/support/mygem/Gemfile.lock +1 -1
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/abstract_methods.rb +7 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/core_ext.rb +1 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/gems_registry/gem.rb +4 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/gems_registry.rb +1 -1
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/class/abstract.rb +9 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/class/self_included_modules.rb +7 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/module/i18n_translate.rb +32 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/call_if_proc.rb +11 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/i18n_translate.rb +13 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/speaker/receiver.rb +10 -10
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/abstract_spec.rb +25 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/self_included_modules_spec.rb +30 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/call_if_proc_spec.rb +11 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/fs/selected.rb +11 -1
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/music/lyrics_book.rb +1 -1
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/version.rb +1 -1
- metadata +16 -5
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/fs/traversable.rb +0 -47
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/fs/traverser.rb +0 -72
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/on_clean_ruby_environment.rb +0 -12
@@ -1,72 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module EacRubyUtils
|
4
|
-
module Fs
|
5
|
-
class Traverser
|
6
|
-
attr_accessor :check_directory, :check_file, :recursive, :hidden_directories, :sort
|
7
|
-
|
8
|
-
def check_path(path)
|
9
|
-
path = ::Pathname.new(path.to_s) unless path.is_a?(::Pathname)
|
10
|
-
internal_check_path(path, 0)
|
11
|
-
end
|
12
|
-
|
13
|
-
def hidden_directories?
|
14
|
-
boolean_value(hidden_directories)
|
15
|
-
end
|
16
|
-
|
17
|
-
def recursive?
|
18
|
-
boolean_value(recursive)
|
19
|
-
end
|
20
|
-
|
21
|
-
def sort?
|
22
|
-
boolean_value(sort)
|
23
|
-
end
|
24
|
-
|
25
|
-
private
|
26
|
-
|
27
|
-
def boolean_value(source_value)
|
28
|
-
source_value = source_value.call if source_value.respond_to?(:call)
|
29
|
-
source_value ? true : false
|
30
|
-
end
|
31
|
-
|
32
|
-
def each_child(dir, &block)
|
33
|
-
if sort?
|
34
|
-
dir.each_child.sort_by { |p| [p.to_s] }.each(&block)
|
35
|
-
else
|
36
|
-
dir.each_child(&block)
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
def process_directory?(level)
|
41
|
-
level.zero? || recursive?
|
42
|
-
end
|
43
|
-
|
44
|
-
def inner_check_directory(dir, level)
|
45
|
-
return unless process_directory?(level)
|
46
|
-
|
47
|
-
user_check_directory(dir)
|
48
|
-
each_child(dir) do |e|
|
49
|
-
next unless !e.basename.to_s.start_with?('.') || hidden_directories?
|
50
|
-
|
51
|
-
internal_check_path(e, level + 1)
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
def internal_check_path(path, level)
|
56
|
-
if path.file?
|
57
|
-
user_check_file(path)
|
58
|
-
elsif path.directory?
|
59
|
-
inner_check_directory(path, level)
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
def user_check_file(path)
|
64
|
-
check_file&.call(path)
|
65
|
-
end
|
66
|
-
|
67
|
-
def user_check_directory(path)
|
68
|
-
check_directory&.call(path)
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/ruby/on_clean_environment'
|
4
|
-
|
5
|
-
module EacRubyUtils
|
6
|
-
class << self
|
7
|
-
# <b>DEPRECATED:</b> Please use <tt>EacRubyUtils::Ruby.on_clean_environment</tt> instead.
|
8
|
-
def on_clean_ruby_environment(*args, &block)
|
9
|
-
::EacRubyUtils::Ruby.on_clean_environment(*args, &block)
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|