ehbrs-tools 0.16.1 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ehbrs/cooking_book.rb +9 -0
- data/lib/ehbrs/cooking_book/build.rb +45 -0
- data/lib/ehbrs/cooking_book/build/base_page.rb +43 -0
- data/lib/ehbrs/cooking_book/build/index_page.rb +26 -0
- data/lib/ehbrs/cooking_book/build/recipe_page.rb +27 -0
- data/lib/ehbrs/cooking_book/project.rb +25 -0
- data/lib/ehbrs/cooking_book/recipe.rb +37 -0
- data/lib/ehbrs/cooking_book/recipe/ingredient.rb +21 -0
- data/lib/ehbrs/cooking_book/recipe/measure.rb +60 -0
- data/lib/ehbrs/cooking_book/recipe/part.rb +32 -0
- data/lib/ehbrs/patches/module/erb_template.rb +11 -0
- data/lib/ehbrs/patches/object/erb_template.rb +9 -0
- data/lib/ehbrs/patches/object/template.rb +7 -0
- data/lib/ehbrs/runner.rb +6 -13
- data/lib/ehbrs/runner/cooking_book.rb +30 -0
- data/lib/ehbrs/runner/cooking_book/build.rb +32 -0
- data/lib/ehbrs/runner/videos/probe.rb +3 -3
- data/lib/ehbrs/tools/application.rb +13 -0
- data/lib/ehbrs/tools/version.rb +1 -1
- data/lib/ehbrs/videos/file.rb +4 -8
- data/lib/ehbrs/videos/track.rb +5 -13
- data/lib/ehbrs/videos/unsupported/checks/codec_extra_unlisted.rb +3 -1
- data/lib/ehbrs/videos/unsupported/checks/codec_extra_unsupported.rb +3 -1
- data/lib/ehbrs/videos/unsupported/checks/codec_unlisted.rb +4 -2
- data/lib/ehbrs/videos/unsupported/checks/codec_unsupported.rb +3 -1
- data/lib/ehbrs/videos/unsupported/checks/invalid_extension.rb +2 -0
- data/lib/ehbrs/videos/unsupported/fix_profile.rb +0 -13
- data/lib/ehbrs/videos/unsupported/fixes/supported_codec.rb +10 -10
- data/lib/ehbrs/videos/unsupported/profiles/base.rb +17 -3
- data/lib/ehbrs/videos/unsupported/profiles/philco.rb +5 -4
- data/template/ehbrs/cooking_book/build/base_page/layout.html.erb +20 -0
- data/template/ehbrs/cooking_book/build/index_page/inner.html.erb +6 -0
- data/template/ehbrs/cooking_book/build/recipe_page/inner.html.erb +6 -0
- data/template/ehbrs/cooking_book/build/recipe_page/part.html.erb +27 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/spec/source_target_fixtures_example.rb +10 -2
- data/vendor/aranha-parsers/lib/aranha/parsers/version.rb +1 -1
- data/vendor/eac_cli/eac_cli.gemspec +1 -1
- data/vendor/eac_cli/lib/eac_cli/definition.rb +34 -39
- data/vendor/eac_cli/lib/eac_cli/definition/alternative.rb +83 -0
- data/vendor/eac_cli/lib/eac_cli/docopt/doc_builder.rb +18 -40
- data/vendor/eac_cli/lib/eac_cli/docopt/doc_builder/alternative.rb +50 -0
- data/vendor/eac_cli/lib/eac_cli/parser.rb +23 -3
- data/vendor/eac_cli/lib/eac_cli/parser/alternative.rb +92 -0
- data/vendor/eac_cli/lib/eac_cli/parser/alternative/argv.rb +17 -0
- data/vendor/eac_cli/lib/eac_cli/parser/alternative/double_dash.rb +24 -0
- data/vendor/eac_cli/lib/eac_cli/parser/alternative/options.rb +58 -0
- data/vendor/eac_cli/lib/eac_cli/parser/alternative/positionals.rb +30 -0
- data/vendor/eac_cli/lib/eac_cli/runner.rb +12 -4
- data/vendor/eac_cli/lib/eac_cli/runner/exit.rb +13 -0
- data/vendor/eac_cli/lib/eac_cli/runner_with/help.rb +18 -1
- data/vendor/eac_cli/lib/eac_cli/runner_with/output_file.rb +5 -1
- data/vendor/eac_cli/lib/eac_cli/runner_with/subcommands.rb +6 -1
- data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
- data/vendor/eac_cli/spec/lib/eac_cli/definition/alternative_spec.rb +14 -0
- data/vendor/eac_cli/spec/lib/eac_cli/docopt/runner_extension_spec.rb +10 -0
- data/vendor/eac_cli/spec/lib/eac_cli/parser/alternative_spec.rb +140 -0
- data/vendor/eac_cli/spec/lib/eac_cli/runner_spec.rb +17 -5
- data/vendor/eac_cli/spec/lib/eac_cli/runner_with/help_spec.rb +42 -0
- data/vendor/eac_cli/spec/lib/eac_cli/runner_with/output_file_spec.rb +53 -0
- data/vendor/eac_cli/spec/lib/eac_cli/runner_with/subcommands_spec.rb +29 -1
- data/vendor/eac_docker/lib/eac_docker/container.rb +24 -0
- data/vendor/eac_docker/lib/eac_docker/images/coded.rb +39 -0
- data/vendor/eac_docker/lib/eac_docker/images/templatized.rb +26 -0
- data/vendor/eac_docker/lib/eac_docker/registry.rb +17 -0
- data/vendor/eac_docker/lib/eac_docker/version.rb +1 -1
- data/vendor/eac_docker/spec/lib/eac_docker/images/coded_spec.rb +12 -0
- data/vendor/eac_docker/spec/lib/eac_docker/images/coded_spec_files/image1/Dockerfile +1 -0
- data/vendor/eac_docker/spec/lib/eac_docker/images/templatized_spec.rb +17 -0
- data/vendor/eac_docker/spec/lib/eac_docker/images/templatized_spec_files/stub_docker_image/Dockerfile +1 -0
- data/vendor/eac_ruby_base0/Gemfile +5 -0
- data/vendor/eac_ruby_base0/eac_ruby_base0.gemspec +20 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0.rb +7 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/application.rb +69 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb +54 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner/test_all.rb +27 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/version.rb +5 -0
- data/vendor/eac_ruby_base0/spec/rubocop_spec.rb +7 -0
- data/vendor/eac_ruby_base0/spec/spec_helper.rb +100 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/abstract_methods.rb +60 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_concern.rb +2 -50
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_concern/class_setup.rb +52 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_concern/module_setup.rb +41 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_constructor.rb +6 -50
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/class_initialize.rb +29 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/instance_initialize.rb +53 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/super_args.rb +54 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner/_subcommands.rb +10 -1
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/command.rb +4 -6
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/command/concat.rb +33 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/command/envvars.rb +24 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/command/extra_options.rb +0 -21
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/module/abstract_methods.rb +10 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/module/template.rb +10 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/template.rb +1 -8
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/basename_sub.rb +2 -2
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/struct.rb +7 -1
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/yaml.rb +11 -2
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/abstract_methods_spec.rb +28 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/common_concern_spec.rb +40 -17
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/common_constructor_spec.rb +96 -8
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/struct_spec.rb +12 -1
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/version.rb +1 -1
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/container.rb +30 -2
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/convert_job.rb +91 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/stream.rb +51 -0
- metadata +89 -13
- data/vendor/eac_cli/lib/eac_cli/parser/options_collection.rb +0 -68
- data/vendor/eac_cli/lib/eac_cli/parser/parse_result.rb +0 -38
- data/vendor/eac_cli/lib/eac_cli/parser/positional_collection.rb +0 -77
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/container/file.rb +0 -31
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/container/info.rb +0 -21
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_cli/core_ext'
|
4
|
+
require 'ehbrs/cooking_book/build'
|
5
|
+
|
6
|
+
module Ehbrs
|
7
|
+
class Runner
|
8
|
+
class CookingBook
|
9
|
+
class Build
|
10
|
+
runner_with :help, :subcommands do
|
11
|
+
desc 'Operações para livros de receitas.'
|
12
|
+
arg_opt '-d', '--target-dir', 'Caminho para o diretório destino da construção.'
|
13
|
+
end
|
14
|
+
|
15
|
+
def run
|
16
|
+
infov 'Project', build.project
|
17
|
+
infov 'Target directory', build.target_dir
|
18
|
+
build.run
|
19
|
+
success 'Done'
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def build_uncached
|
25
|
+
::Ehbrs::CookingBook::Build.new(
|
26
|
+
runner_context.call(:project), target_dir: parsed.target_dir
|
27
|
+
)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'eac_cli/core_ext'
|
4
|
-
require 'ehbrs_ruby_utils/videos/container
|
4
|
+
require 'ehbrs_ruby_utils/videos/container'
|
5
5
|
require 'eac_ruby_utils/yaml'
|
6
6
|
|
7
7
|
module Ehbrs
|
@@ -18,13 +18,13 @@ module Ehbrs
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def output_content
|
21
|
-
::EacRubyUtils::Yaml.dump(container_file.
|
21
|
+
::EacRubyUtils::Yaml.dump(container_file.probe_data)
|
22
22
|
end
|
23
23
|
|
24
24
|
private
|
25
25
|
|
26
26
|
def container_file_uncached
|
27
|
-
::EhbrsRubyUtils::Videos::Container
|
27
|
+
::EhbrsRubyUtils::Videos::Container.new(parsed.file_path)
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_base0/application'
|
4
|
+
|
5
|
+
module Ehbrs
|
6
|
+
module Tools
|
7
|
+
class << self
|
8
|
+
def application
|
9
|
+
@application ||= ::EacRubyBase0::Application.new(::File.expand_path('../../..', __dir__))
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/lib/ehbrs/tools/version.rb
CHANGED
data/lib/ehbrs/videos/file.rb
CHANGED
@@ -3,10 +3,11 @@
|
|
3
3
|
require 'eac_ruby_utils/core_ext'
|
4
4
|
require 'ehbrs/videos/track'
|
5
5
|
require 'ehbrs_ruby_utils/executables'
|
6
|
+
require 'ehbrs_ruby_utils/videos/container'
|
6
7
|
|
7
8
|
module Ehbrs
|
8
9
|
module Videos
|
9
|
-
class File
|
10
|
+
class File < ::EhbrsRubyUtils::Videos::Container
|
10
11
|
enable_simple_cache
|
11
12
|
|
12
13
|
TIME_PATTERN = /(\d+):(\d{2}):(\d{2})(?:\.(\d+))/.freeze
|
@@ -39,17 +40,12 @@ module Ehbrs
|
|
39
40
|
end
|
40
41
|
end
|
41
42
|
|
42
|
-
common_constructor :path
|
43
|
-
|
44
43
|
private
|
45
44
|
|
46
45
|
def tracks_uncached
|
47
|
-
|
48
|
-
|
49
|
-
t = ::Ehbrs::Videos::Track.create_from_string(line)
|
50
|
-
r << t if t && t.type != 'Data'
|
46
|
+
streams.map { |stream| ::Ehbrs::Videos::Track.new(stream) }.reject do |t|
|
47
|
+
t.codec_type == ::EhbrsRubyUtils::Videos::Stream::CODEC_TYPE_DATA
|
51
48
|
end
|
52
|
-
r
|
53
49
|
end
|
54
50
|
|
55
51
|
def content_uncached
|
data/lib/ehbrs/videos/track.rb
CHANGED
@@ -1,25 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'eac_ruby_utils/core_ext'
|
4
|
+
require 'ehbrs_ruby_utils/videos/stream'
|
4
5
|
|
5
6
|
module Ehbrs
|
6
7
|
module Videos
|
7
|
-
class Track
|
8
|
-
|
9
|
-
|
10
|
-
class << self
|
11
|
-
def create_from_string(string)
|
12
|
-
m = FFPROBE_PATTERN.match(string)
|
13
|
-
return nil unless m
|
14
|
-
|
15
|
-
new(m[1].to_i, m[3], m[2], m[4], m[5].strip)
|
16
|
-
end
|
8
|
+
class Track < ::SimpleDelegator
|
9
|
+
def extra
|
10
|
+
ffprobe_data.fetch(:codec_tag_string).to_s
|
17
11
|
end
|
18
12
|
|
19
|
-
common_constructor :number, :type, :language, :codec, :extra
|
20
|
-
|
21
13
|
def to_s
|
22
|
-
"[#{
|
14
|
+
"[#{codec_type}(#{index}): #{codec_name}/#{language || '-'}" +
|
23
15
|
extra.if_present('') { |v| " | #{v}" } + ']'
|
24
16
|
end
|
25
17
|
end
|
@@ -5,10 +5,12 @@ module Ehbrs
|
|
5
5
|
module Unsupported
|
6
6
|
module Checks
|
7
7
|
class CodecExtraUnlisted
|
8
|
+
TYPE = :stream
|
9
|
+
|
8
10
|
common_constructor :codec, :listed_extras
|
9
11
|
|
10
12
|
def check(track)
|
11
|
-
return nil unless track.
|
13
|
+
return nil unless track.codec_name == codec
|
12
14
|
return nil if listed_extras.any? do |extra|
|
13
15
|
track.extra.downcase.include?(extra.downcase)
|
14
16
|
end
|
@@ -7,10 +7,12 @@ module Ehbrs
|
|
7
7
|
module Unsupported
|
8
8
|
module Checks
|
9
9
|
class CodecExtraUnsupported
|
10
|
+
TYPE = :stream
|
11
|
+
|
10
12
|
common_constructor :codec, :extra
|
11
13
|
|
12
14
|
def check(track)
|
13
|
-
return nil unless track.
|
15
|
+
return nil unless track.codec_name == codec
|
14
16
|
return nil unless track.extra.downcase.include?(extra.downcase)
|
15
17
|
|
16
18
|
"Unsupported extra \"#{extra}\" for codec \"#{codec}\" and track #{track}"
|
@@ -5,12 +5,14 @@ module Ehbrs
|
|
5
5
|
module Unsupported
|
6
6
|
module Checks
|
7
7
|
class CodecUnlisted
|
8
|
+
TYPE = :stream
|
9
|
+
|
8
10
|
common_constructor :listed_codecs
|
9
11
|
|
10
12
|
def check(track)
|
11
|
-
return nil if listed_codecs.include?(track.
|
13
|
+
return nil if listed_codecs.include?(track.codec_name)
|
12
14
|
|
13
|
-
"Not listed codec \"#{track.
|
15
|
+
"Not listed codec \"#{track.codec_name}\" (Track: #{track}, listed: #{listed_codecs})"
|
14
16
|
end
|
15
17
|
|
16
18
|
def fix
|
@@ -7,10 +7,12 @@ module Ehbrs
|
|
7
7
|
module Unsupported
|
8
8
|
module Checks
|
9
9
|
class CodecUnsupported
|
10
|
+
TYPE = :stream
|
11
|
+
|
10
12
|
common_constructor :codec
|
11
13
|
|
12
14
|
def check(track)
|
13
|
-
return nil unless track.
|
15
|
+
return nil unless track.codec_name == codec
|
14
16
|
|
15
17
|
"Unsupported codec \"#{codec}\" for track #{track}"
|
16
18
|
end
|
@@ -35,19 +35,6 @@ module Ehbrs
|
|
35
35
|
video.tracks.flat_map(&:ffmpeg_fix_args)
|
36
36
|
end
|
37
37
|
|
38
|
-
def track_fix_args(track)
|
39
|
-
["#{track_codec_option_by_type(track.type)}:#{track.number}",
|
40
|
-
track.passed? ? 'copy' : track_codec_fix_by_type(track.type)]
|
41
|
-
end
|
42
|
-
|
43
|
-
def track_codec_option_by_type(track_type)
|
44
|
-
TRACK_TYPE_OPTIONS.fetch(track_type)
|
45
|
-
end
|
46
|
-
|
47
|
-
def track_codec_fix_by_type(track_type)
|
48
|
-
TRACK_TYPE_FIX_CODECS.fetch(track_type)
|
49
|
-
end
|
50
|
-
|
51
38
|
def container_fix_args
|
52
39
|
['-f', ::Ehbrs::Videos::Unsupported::Fixes::SupportedContainer::FIX_FORMAT]
|
53
40
|
end
|
@@ -6,28 +6,28 @@ module Ehbrs
|
|
6
6
|
module Fixes
|
7
7
|
class SupportedCodec
|
8
8
|
TRACK_TYPE_OPTIONS = {
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
audio: '-acodec',
|
10
|
+
video: '-vcodec',
|
11
|
+
subtitle: '-scodec'
|
12
12
|
}.freeze
|
13
13
|
|
14
14
|
TRACK_TYPE_FIX_CODECS = {
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
audio: 'libvorbis',
|
16
|
+
video: 'libx264',
|
17
|
+
subtitle: 'ass'
|
18
18
|
}.freeze
|
19
19
|
|
20
20
|
def ffmpeg_args(track)
|
21
|
-
["#{track_codec_option_by_type(track.
|
22
|
-
track_codec_fix_by_type(track.
|
21
|
+
["#{track_codec_option_by_type(track.codec_type)}:#{track.index}",
|
22
|
+
track_codec_fix_by_type(track.codec_type)]
|
23
23
|
end
|
24
24
|
|
25
25
|
def track_codec_option_by_type(track_type)
|
26
|
-
TRACK_TYPE_OPTIONS.fetch(track_type)
|
26
|
+
TRACK_TYPE_OPTIONS.fetch(track_type.to_s.underscore.to_sym)
|
27
27
|
end
|
28
28
|
|
29
29
|
def track_codec_fix_by_type(track_type)
|
30
|
-
TRACK_TYPE_FIX_CODECS.fetch(track_type)
|
30
|
+
TRACK_TYPE_FIX_CODECS.fetch(track_type.to_s.underscore.to_sym)
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
@@ -19,13 +19,21 @@ module Ehbrs
|
|
19
19
|
added_checks << check_path.camelize.constantize.new(*args)
|
20
20
|
end
|
21
21
|
|
22
|
+
def base_checks
|
23
|
+
[unlisted_codec_check] + unsupported_codec_checks +
|
24
|
+
supported_codecs.flat_map { |codec| codec_extra_checks(codec) }
|
25
|
+
end
|
26
|
+
|
27
|
+
def checks
|
28
|
+
base_checks + added_checks
|
29
|
+
end
|
30
|
+
|
22
31
|
def file_checks
|
23
|
-
|
32
|
+
checks.select { |c| check_type(c) == :container }
|
24
33
|
end
|
25
34
|
|
26
35
|
def track_checks
|
27
|
-
|
28
|
-
supported_codecs.flat_map { |codec| codec_extra_checks(codec) }
|
36
|
+
checks.select { |c| check_type(c) == :stream }
|
29
37
|
end
|
30
38
|
|
31
39
|
def codec_extra_checks(codec)
|
@@ -95,6 +103,12 @@ module Ehbrs
|
|
95
103
|
def codec_supported_extras(codec)
|
96
104
|
codec_extras(codec, 'supported')
|
97
105
|
end
|
106
|
+
|
107
|
+
private
|
108
|
+
|
109
|
+
def check_type(check)
|
110
|
+
check.class.const_get(:TYPE)
|
111
|
+
end
|
98
112
|
end
|
99
113
|
end
|
100
114
|
end
|
@@ -7,19 +7,20 @@ module Ehbrs
|
|
7
7
|
module Unsupported
|
8
8
|
module Profiles
|
9
9
|
class Philco < ::Ehbrs::Videos::Unsupported::Profiles::Base
|
10
|
-
AUDIO_SUPPORTED_CODECS = %w[aac ac3 eac3 mp3].freeze
|
11
|
-
AUDIO_UNSUPPORTED_CODECS = %w[dts].freeze
|
10
|
+
AUDIO_SUPPORTED_CODECS = %w[aac ac3 eac3 mp3 vorbis wmav2].freeze
|
11
|
+
AUDIO_UNSUPPORTED_CODECS = %w[dts opus].freeze
|
12
12
|
|
13
13
|
VIDEO_SUPPORTED_CODECS = %w[h264 mpeg4].freeze
|
14
14
|
VIDEO_UNSUPPORTED_CODECS = %w[hevc msmpeg4v3].freeze
|
15
15
|
|
16
|
-
SUBTITLE_SUPPORTED_CODECS = %w[ass dvd
|
16
|
+
SUBTITLE_SUPPORTED_CODECS = %w[ass dvd dvd_subtitle hdmv_pgs_subtitle mov_text
|
17
|
+
subrip].freeze
|
17
18
|
SUBTITLE_UNSUPPORTED_CODECS = %w[mov].freeze
|
18
19
|
|
19
20
|
OTHER_SUPPORTED_CODECS = %w[png ttf].freeze
|
20
21
|
|
21
22
|
MPEG4_EXTRA_SUPPORTED = %w[xvid].freeze
|
22
|
-
MPEG4_EXTRA_UNSUPPORTED = %w[dx50].freeze
|
23
|
+
MPEG4_EXTRA_UNSUPPORTED = %w[divx dx50].freeze
|
23
24
|
end
|
24
25
|
end
|
25
26
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title><%= title %></title>
|
5
|
+
<meta charset="utf-8">
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
7
|
+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css"
|
8
|
+
rel="stylesheet"
|
9
|
+
integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1"
|
10
|
+
crossorigin="anonymous">
|
11
|
+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js"
|
12
|
+
integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW"
|
13
|
+
crossorigin="anonymous"
|
14
|
+
></script>
|
15
|
+
</head>
|
16
|
+
<body>
|
17
|
+
<h1><%= title %></h1>
|
18
|
+
<%= inner_content %>
|
19
|
+
</body>
|
20
|
+
</html>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<h2><%= title %></h2>
|
2
|
+
<h3>Ingredientes</h3>
|
3
|
+
<% if notes.present? %>
|
4
|
+
<%= notes %>
|
5
|
+
<% end %>
|
6
|
+
<table class="table">
|
7
|
+
<thead>
|
8
|
+
<tr>
|
9
|
+
<th scope="col">Ingrediente</th>
|
10
|
+
<th scope="col">Medida</th>
|
11
|
+
</tr>
|
12
|
+
</thead>
|
13
|
+
<tbody>
|
14
|
+
<% ingredients.each do |ingredient| %>
|
15
|
+
<tr>
|
16
|
+
<th scope="row"><%= ingredient.name %></th>
|
17
|
+
<td><%= ingredient.measure %></td>
|
18
|
+
</tr>
|
19
|
+
<% end %>
|
20
|
+
</tbody>
|
21
|
+
</table>
|
22
|
+
<h3>Preparo</h3>
|
23
|
+
<ol>
|
24
|
+
<% steps.each do |step| %>
|
25
|
+
<li><%= step %></li>
|
26
|
+
<% end %>
|
27
|
+
</ol>
|
@@ -20,8 +20,8 @@ RSpec.shared_examples 'source_target_fixtures' do |spec_file| # rubocop:disable
|
|
20
20
|
source_target_fixtures.source_files.each do |source_file|
|
21
21
|
sd = sort_results(source_data(source_file))
|
22
22
|
basename = ::Aranha::Parsers::SourceTargetFixtures.source_target_basename(source_file)
|
23
|
-
target_file = File.expand_path("../#{basename}.target
|
24
|
-
File.write(target_file, sd
|
23
|
+
target_file = File.expand_path("../#{basename}.target#{target_file_extname}", source_file)
|
24
|
+
File.write(target_file, target_content(sd))
|
25
25
|
end
|
26
26
|
end
|
27
27
|
else
|
@@ -67,4 +67,12 @@ RSpec.shared_examples 'source_target_fixtures' do |spec_file| # rubocop:disable
|
|
67
67
|
def target_data(target_file)
|
68
68
|
::YAML.load_file(target_file)
|
69
69
|
end
|
70
|
+
|
71
|
+
def target_content(data)
|
72
|
+
data.to_yaml
|
73
|
+
end
|
74
|
+
|
75
|
+
def target_file_extname
|
76
|
+
'.yaml'
|
77
|
+
end
|
70
78
|
end
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
|
13
13
|
s.files = Dir['{lib}/**/*', 'Gemfile']
|
14
14
|
|
15
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.
|
15
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.55'
|
16
16
|
|
17
17
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.1', '>= 0.1.2'
|
18
18
|
end
|