ehbrs-tools 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ehbrs/tools/version.rb +1 -1
- data/lib/ehbrs/videos/convert_job.rb +1 -1
- data/lib/ehbrs/videos/unsupported/profiles/philco.rb +1 -1
- data/vendor/eac_cli/lib/eac_cli/runner/definition.rb +4 -0
- data/vendor/eac_cli/lib/eac_cli/runner/docopt_doc.rb +8 -3
- data/vendor/eac_cli/lib/eac_cli/runner/positional_argument.rb +8 -0
- data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
- data/vendor/eac_ruby_utils/eac_ruby_utils.gemspec +2 -3
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils.rb +1 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/by_reference.rb +23 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/speaker.rb +2 -3
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/speaker/_constants.rb +14 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/speaker/node.rb +4 -3
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/if_present.rb +7 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname.rb +4 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/basename_sub.rb +9 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/basename_sub_spec.rb +17 -0
- data/vendor/eac_ruby_utils/spec/rubocop_check_spec.rb +7 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b438bde26af678d3677255f2d39bcc65ed81c12b76ae6cf511525162ca9ac817
|
4
|
+
data.tar.gz: 73ef2123e1a77fdd3b243ff11b019410fdbd8eabf3017217cec8737b4ee7fe13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1658664c94ee2c08b6357756255a25007b8e161152d0f859ac3c90c8180cdc9defc268ed00f15f2b6409dd98c25e1a2e824d9313c657d8ad7b4cf05f21c4eb42
|
7
|
+
data.tar.gz: 2c5db9ac476c19492481b080fcfd9ba883eb8aef29df3f619523071d5847d044d88cae271e1060a7c1801855e227095390278bdbcfeef55d5a9c85f944f62d69
|
data/lib/ehbrs/tools/version.rb
CHANGED
@@ -16,7 +16,7 @@ module Ehbrs
|
|
16
16
|
SUBTITLE_SUPPORTED_CODECS = %w[ass dvd subrip].freeze
|
17
17
|
SUBTITLE_UNSUPPORTED_CODECS = %w[mov].freeze
|
18
18
|
|
19
|
-
OTHER_SUPPORTED_CODECS = %w[ttf].freeze
|
19
|
+
OTHER_SUPPORTED_CODECS = %w[png ttf].freeze
|
20
20
|
|
21
21
|
MPEG4_EXTRA_SUPPORTED = %w[xvid].freeze
|
22
22
|
MPEG4_EXTRA_UNSUPPORTED = %w[dx50].freeze
|
@@ -13,9 +13,14 @@ module EacCli
|
|
13
13
|
OPTION_DESC_SEP = IDENT * 2
|
14
14
|
|
15
15
|
def positional_argument(positional)
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
if positional.subcommand?
|
17
|
+
::EacRubyUtils::Console::DocoptRunner::SUBCOMMANDS_MACRO
|
18
|
+
else
|
19
|
+
r = "<#{positional.name}>"
|
20
|
+
r += '...' if positional.repeat?
|
21
|
+
r = "[#{r}]" if positional.optional?
|
22
|
+
r
|
23
|
+
end
|
19
24
|
end
|
20
25
|
|
21
26
|
def option_argument(option)
|
@@ -7,9 +7,17 @@ module EacCli
|
|
7
7
|
class PositionalArgument
|
8
8
|
common_constructor :name, :options, default: [{}]
|
9
9
|
|
10
|
+
def optional?
|
11
|
+
options[:optional]
|
12
|
+
end
|
13
|
+
|
10
14
|
def repeat?
|
11
15
|
options[:repeat]
|
12
16
|
end
|
17
|
+
|
18
|
+
def subcommand?
|
19
|
+
options[:subcommand]
|
20
|
+
end
|
13
21
|
end
|
14
22
|
end
|
15
23
|
end
|
@@ -15,11 +15,10 @@ Gem::Specification.new do |s|
|
|
15
15
|
|
16
16
|
s.files = Dir['{lib}/**/*', 'MIT-LICENSE', 'README.rdoc']
|
17
17
|
|
18
|
-
s.add_dependency 'activesupport', '
|
18
|
+
s.add_dependency 'activesupport', '>= 4.0'
|
19
19
|
s.add_dependency 'addressable', '~> 2.6'
|
20
20
|
s.add_dependency 'colorize', '~> 0.8.1'
|
21
21
|
s.add_dependency 'docopt', '~> 0.6.1'
|
22
22
|
s.add_dependency 'net-ssh', '~> 4.2'
|
23
|
-
s.add_development_dependency '
|
24
|
-
s.add_development_dependency 'rubocop', '~> 0.80.1'
|
23
|
+
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.1'
|
25
24
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EacRubyUtils
|
4
|
+
class ByReference
|
5
|
+
def initialize(&object_provider)
|
6
|
+
@object_provider = object_provider
|
7
|
+
end
|
8
|
+
|
9
|
+
def method_missing(method_name, *arguments, &block)
|
10
|
+
return object.send(method_name, *arguments) if object.respond_to?(method_name)
|
11
|
+
|
12
|
+
super
|
13
|
+
end
|
14
|
+
|
15
|
+
def object
|
16
|
+
@object_provider.call
|
17
|
+
end
|
18
|
+
|
19
|
+
def respond_to_missing?(method_name, include_private = false)
|
20
|
+
object.respond_to?(method_name, include_private)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -3,9 +3,8 @@
|
|
3
3
|
require 'colorize'
|
4
4
|
require 'io/console'
|
5
5
|
require 'eac_ruby_utils/patches/hash/options_consumer'
|
6
|
-
require 'eac_ruby_utils/
|
7
|
-
|
8
|
-
require 'eac_ruby_utils/console/speaker/node'
|
6
|
+
require 'eac_ruby_utils/require_sub'
|
7
|
+
::EacRubyUtils.require_sub __FILE__
|
9
8
|
|
10
9
|
module EacRubyUtils
|
11
10
|
module Console
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/by_reference'
|
4
|
+
|
5
|
+
module EacRubyUtils
|
6
|
+
module Console
|
7
|
+
# https://github.com/fazibear/colorize
|
8
|
+
module Speaker
|
9
|
+
STDERR = ::EacRubyUtils::ByReference.new { $stderr }
|
10
|
+
STDIN = ::EacRubyUtils::ByReference.new { $stdin }
|
11
|
+
STDOUT = ::EacRubyUtils::ByReference.new { $stdout }
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'eac_ruby_utils/patches/object/if_present'
|
4
|
+
require 'eac_ruby_utils/console/speaker/_constants'
|
4
5
|
|
5
6
|
module EacRubyUtils
|
6
7
|
module Console
|
@@ -9,9 +10,9 @@ module EacRubyUtils
|
|
9
10
|
attr_accessor :stdin, :stdout, :stderr, :stderr_line_prefix
|
10
11
|
|
11
12
|
def initialize(parent = nil)
|
12
|
-
self.stdin = parent.if_present(STDIN, &:stdin)
|
13
|
-
self.stdout = parent.if_present(STDOUT, &:stdout)
|
14
|
-
self.stderr = parent.if_present(STDERR, &:stderr)
|
13
|
+
self.stdin = parent.if_present(::EacRubyUtils::Console::Speaker::STDIN, &:stdin)
|
14
|
+
self.stdout = parent.if_present(::EacRubyUtils::Console::Speaker::STDOUT, &:stdout)
|
15
|
+
self.stderr = parent.if_present(::EacRubyUtils::Console::Speaker::STDERR, &:stderr)
|
15
16
|
self.stderr_line_prefix = parent.if_present('', &:stderr_line_prefix)
|
16
17
|
end
|
17
18
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/patches/pathname/basename_sub'
|
4
|
+
|
5
|
+
RSpec.describe ::Pathname do
|
6
|
+
it do
|
7
|
+
expect(::Pathname.new('/absolute/path/to/file').basename_sub { |_b| 'other_file' }).to eq(
|
8
|
+
::Pathname.new('/absolute/path/to/other_file')
|
9
|
+
)
|
10
|
+
end
|
11
|
+
|
12
|
+
it do
|
13
|
+
expect(::Pathname.new('file').basename_sub { |b| b.to_s + '_appended' }).to eq(
|
14
|
+
::Pathname.new('file_appended')
|
15
|
+
)
|
16
|
+
end
|
17
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ehbrs-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esquilo Azul Company
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eac_ruby_utils
|
@@ -102,6 +102,7 @@ files:
|
|
102
102
|
- vendor/eac_ruby_utils/eac_ruby_utils.gemspec
|
103
103
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils.rb
|
104
104
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/arguments_consumer.rb
|
105
|
+
- vendor/eac_ruby_utils/lib/eac_ruby_utils/by_reference.rb
|
105
106
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/common_constructor.rb
|
106
107
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/configs.rb
|
107
108
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/configs/file.rb
|
@@ -114,6 +115,7 @@ files:
|
|
114
115
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner/_subcommands.rb
|
115
116
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/console/speaker.rb
|
116
117
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/console/speaker/_class_methods.rb
|
118
|
+
- vendor/eac_ruby_utils/lib/eac_ruby_utils/console/speaker/_constants.rb
|
117
119
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/console/speaker/list.rb
|
118
120
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/console/speaker/node.rb
|
119
121
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/contextualizable.rb
|
@@ -157,6 +159,8 @@ files:
|
|
157
159
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/asserts.rb
|
158
160
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/if_present.rb
|
159
161
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/template.rb
|
162
|
+
- vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname.rb
|
163
|
+
- vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/basename_sub.rb
|
160
164
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/paths_hash.rb
|
161
165
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/require_sub.rb
|
162
166
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec.rb
|
@@ -189,6 +193,7 @@ files:
|
|
189
193
|
- vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/if_present_spec.rb
|
190
194
|
- vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/template_spec.rb
|
191
195
|
- vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/template_spec_files/path/my_stub_with_template
|
196
|
+
- vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/basename_sub_spec.rb
|
192
197
|
- vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/paths_hash_spec.rb
|
193
198
|
- vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/settings_provider_spec.rb
|
194
199
|
- vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/simple_cache_spec.rb
|
@@ -200,6 +205,7 @@ files:
|
|
200
205
|
- vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/templates/searcher_spec_files/path1/subdir1/file2
|
201
206
|
- vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/templates/searcher_spec_files/path2/subdir1/file3.template
|
202
207
|
- vendor/eac_ruby_utils/spec/locales/pt-BR.yml
|
208
|
+
- vendor/eac_ruby_utils/spec/rubocop_check_spec.rb
|
203
209
|
- vendor/eac_ruby_utils/spec/spec_helper.rb
|
204
210
|
homepage:
|
205
211
|
licenses: []
|