ehbrs_ruby_utils 0.6.1 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +1 -0
  3. data/.rubocop.yml +31 -0
  4. data/lib/ehbrs_ruby_utils/finances/bb_browser/docker_image.rb +18 -0
  5. data/lib/ehbrs_ruby_utils/patches/object/template.rb +6 -0
  6. data/lib/ehbrs_ruby_utils/version.rb +1 -1
  7. data/lib/ehbrs_ruby_utils/videos/stream.rb +1 -1
  8. data/lib/ehbrs_ruby_utils/web_utils/videos/file/rename.rb +28 -0
  9. data/lib/ehbrs_ruby_utils/web_utils/videos/file.rb +11 -8
  10. data/spec/lib/ehbrs_ruby_utils/videos/resolution_spec.rb +18 -0
  11. data/spec/lib/ehbrs_ruby_utils/videos/stream_spec.rb +13 -0
  12. data/spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_attachment.source.yaml +28 -0
  13. data/spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_attachment.target.yaml +7 -0
  14. data/spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_audio.source.yaml +49 -0
  15. data/spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_audio.target.yaml +7 -0
  16. data/spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_subtitle.source.yaml +43 -0
  17. data/spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_subtitle.target.yaml +7 -0
  18. data/spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_video.source.yaml +59 -0
  19. data/spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_video.target.yaml +7 -0
  20. data/spec/rubocop_check_spec.rb +3 -0
  21. data/spec/spec_helper.rb +4 -0
  22. data/template/ehbrs_ruby_utils/finances/bb_browser/docker_image/Dockerfile +44 -0
  23. data/template/ehbrs_ruby_utils/finances/bb_browser/docker_image/Makefile +35 -0
  24. data/template/ehbrs_ruby_utils/finances/bb_browser/docker_image/README.md +16 -0
  25. data/template/ehbrs_ruby_utils/finances/bb_browser/docker_image/context/firefox.service +8 -0
  26. data/template/ehbrs_ruby_utils/finances/bb_browser/docker_image/context/startbrowser.sh +9 -0
  27. metadata +59 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 86d2b7290ba8a20d4c3f8a87ed7d3fecb6d4fd877d700524ce7c467a40f96cf7
4
- data.tar.gz: f3817effe28180094b3d6fd1182d9bea026f7de3c98debdc1b13fd855eb8486a
3
+ metadata.gz: 0f0bf8ac8c8902aea1601e17b525b178db51cce6fbea9f205a64afb0b4f75c4d
4
+ data.tar.gz: 64f23644c1f126638f5cde4ddb8adce6df449fb0cb5e6e148fc67ca1678e9cfe
5
5
  SHA512:
6
- metadata.gz: 3fac516de86eb3e88e7cc30263d5b97a94e8fd542d75fda8b0e3f49604ada03a1897f9bac167da3dff88e7668583e6dca223d65a8bfd2f92b6b6f5aa78ba9c6b
7
- data.tar.gz: 07c97a47c7e2b7ece00d7a1f2ed0d4f929b189139ad27c505f7231f4d6891bbfc9976908ff5105b3766b303f19b06215260bc114371de7861c2dbfd63aa3c4e0
6
+ metadata.gz: 37fabbe2868285dc7c616dd9682c0c129b8d107985f66e9b59abd88fbdfed81d463b55b2daa388ca65f142e0eb29beee8598a0cfa24d278624f802253d6edaa3
7
+ data.tar.gz: e1cdb672ff5affda1cfc7e55b546dda9f79c64d61cee0ccc1a0c9df16c10e6090c8d6bf058acf7354db122c3e00083377a04d904e3062b03b5bfee90fd2952be
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,31 @@
1
+ require:
2
+ - rubocop-rails
3
+ - rubocop-rspec
4
+
5
+ AllCops:
6
+ TargetRubyVersion: 2.4
7
+
8
+ Layout/LineLength:
9
+ Max: 100
10
+
11
+ Metrics/BlockLength:
12
+ Exclude:
13
+ - 'spec/**/*_spec.rb'
14
+
15
+ Style/Documentation:
16
+ Enabled: false
17
+
18
+ Style/AsciiComments:
19
+ Enabled: false
20
+
21
+ Style/HashEachMethods:
22
+ Enabled: true
23
+
24
+ Style/HashTransformKeys:
25
+ Enabled: true
26
+
27
+ Style/HashTransformValues:
28
+ Enabled: true
29
+
30
+ Layout/MultilineMethodCallIndentation:
31
+ EnforcedStyle: indented_relative_to_receiver
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_docker/images/templatized'
4
+ require 'ehbrs_ruby_utils/patches/object/template'
5
+
6
+ module EhbrsRubyUtils
7
+ module Finances
8
+ module BbBrowser
9
+ class DockerImage < ::EacDocker::Images::Templatized
10
+ class << self
11
+ def create
12
+ new.tag(name.variableize)
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_templates/patches/object/template'
4
+
5
+ ::EacTemplates::Searcher.default.included_paths <<
6
+ ::File.expand_path('../../../../template', __dir__)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EhbrsRubyUtils
4
- VERSION = '0.6.1'
4
+ VERSION = '0.9.0'
5
5
  end
@@ -35,7 +35,7 @@ module EhbrsRubyUtils
35
35
  end
36
36
  end
37
37
 
38
- %i[codec_name codec_long_name].each do |method_name|
38
+ %i[codec_name codec_long_name height width].each do |method_name|
39
39
  define_method method_name do
40
40
  ffprobe_data[method_name]
41
41
  end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module EhbrsRubyUtils
6
+ module WebUtils
7
+ module Videos
8
+ class File < ::SimpleDelegator
9
+ class Rename
10
+ common_constructor :file, :target_path
11
+
12
+ delegate :original_path, to: :file
13
+
14
+ def can_rename?
15
+ ::File.exist?(original_path) && !::File.exist?(target_path)
16
+ end
17
+
18
+ def perform
19
+ return unless can_rename?
20
+
21
+ ::FileUtils.mkdir_p(::File.dirname(target_path))
22
+ ::FileUtils.mv(original_path, target_path)
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -1,11 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'ostruct'
4
+ require 'eac_ruby_utils/core_ext'
4
5
 
5
6
  module EhbrsRubyUtils
6
7
  module WebUtils
7
8
  module Videos
8
9
  class File < ::SimpleDelegator
10
+ require_sub __FILE__
11
+
9
12
  def initialize(data)
10
13
  super(::OpenStruct.new(data))
11
14
  end
@@ -14,12 +17,15 @@ module EhbrsRubyUtils
14
17
  ::File.exist?(original_path)
15
18
  end
16
19
 
17
- def path_changed?
18
- original_path != new_path
20
+ def move(target_dir)
21
+ ::EhbrsRubyUtils::WebUtils::Videos::File::Rename.new(
22
+ self,
23
+ target_dir.to_pathname.join(original_path.to_pathname.relative_path_from(root_path))
24
+ ).perform
19
25
  end
20
26
 
21
- def can_rename?
22
- ::File.exist?(original_path) && !::File.exist?(new_path)
27
+ def path_changed?
28
+ original_path != new_path
23
29
  end
24
30
 
25
31
  def remove
@@ -29,10 +35,7 @@ module EhbrsRubyUtils
29
35
  end
30
36
 
31
37
  def rename
32
- return unless can_rename?
33
-
34
- ::FileUtils.mkdir_p(::File.dirname(new_path))
35
- ::FileUtils.mv(original_path, new_path)
38
+ ::EhbrsRubyUtils::WebUtils::Videos::File::Rename.new(self, new_path).perform
36
39
  end
37
40
  end
38
41
  end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'ehbrs_ruby_utils/videos/resolution'
4
+
5
+ RSpec.describe ::EhbrsRubyUtils::Videos::Resolution do
6
+ describe '#quality' do
7
+ { [500, 720] => 480, [1080, 720] => 720, [1, 1] => 240, [9999, 9999] => 2160,
8
+ [480, 420] => 240, [480, 421] => 480 }.each do |resolution_parts, quality_height|
9
+ context "when resolution is #{described_class.new(*resolution_parts).to_xs}" do
10
+ let(:instance) { described_class.new(*resolution_parts) }
11
+
12
+ it "quality is #{::EhbrsRubyUtils::Videos::Quality.by_height(quality_height).to_xs}" do
13
+ expect(instance.quality.height).to eq(quality_height)
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'ehbrs_ruby_utils/videos/stream'
4
+
5
+ RSpec.describe ::EhbrsRubyUtils::Videos::Stream do
6
+ include_examples 'source_target_fixtures', __FILE__
7
+
8
+ def source_data(source_file)
9
+ instance = described_class.new(::YAML.load_file(source_file))
10
+ %w[codec_name codec_long_name codec_type index language title]
11
+ .map { |k| [k.to_sym, instance.send(k)] }.sort.to_h
12
+ end
13
+ end
@@ -0,0 +1,28 @@
1
+ ---
2
+ :index: 19
3
+ :codec_type: attachment
4
+ :codec_tag_string: "[0][0][0][0]"
5
+ :codec_tag: '0x0000'
6
+ :r_frame_rate: 0/0
7
+ :avg_frame_rate: 0/0
8
+ :time_base: 1/90000
9
+ :start_pts: 0
10
+ :start_time: '0.000000'
11
+ :duration_ts: 383973120
12
+ :duration: '4266.368000'
13
+ :disposition:
14
+ :default: 0
15
+ :dub: 0
16
+ :original: 0
17
+ :comment: 0
18
+ :lyrics: 0
19
+ :karaoke: 0
20
+ :forced: 0
21
+ :hearing_impaired: 0
22
+ :visual_impaired: 0
23
+ :clean_effects: 0
24
+ :attached_pic: 0
25
+ :timed_thumbnails: 0
26
+ :tags:
27
+ :filename: encoding-source-code.7z
28
+ :mimetype: application/octet-stream
@@ -0,0 +1,7 @@
1
+ ---
2
+ :codec_long_name:
3
+ :codec_name:
4
+ :codec_type: :attachment
5
+ :index: 19
6
+ :language:
7
+ :title:
@@ -0,0 +1,49 @@
1
+ ---
2
+ :index: 18
3
+ :codec_name: aac
4
+ :codec_long_name: AAC (Advanced Audio Coding)
5
+ :profile: LC
6
+ :codec_type: audio
7
+ :codec_time_base: 1/48000
8
+ :codec_tag_string: "[0][0][0][0]"
9
+ :codec_tag: '0x0000'
10
+ :sample_fmt: fltp
11
+ :sample_rate: '48000'
12
+ :channels: 2
13
+ :channel_layout: stereo
14
+ :bits_per_sample: 0
15
+ :r_frame_rate: 0/0
16
+ :avg_frame_rate: 0/0
17
+ :time_base: 1/1000
18
+ :start_pts: 0
19
+ :start_time: '0.000000'
20
+ :disposition:
21
+ :default: 1
22
+ :dub: 0
23
+ :original: 0
24
+ :comment: 0
25
+ :lyrics: 0
26
+ :karaoke: 0
27
+ :forced: 0
28
+ :hearing_impaired: 0
29
+ :visual_impaired: 0
30
+ :clean_effects: 0
31
+ :attached_pic: 0
32
+ :timed_thumbnails: 0
33
+ :tags:
34
+ :language: jpn
35
+ :title: "[AnimeRG] Tenshi No Tamago [1080p] [ScavvyKiD]"
36
+ :BPS: '125375'
37
+ :BPS-eng: '125375'
38
+ :DURATION: '01:11:06.368000000'
39
+ :DURATION-eng: '01:11:06.368000000'
40
+ :NUMBER_OF_FRAMES: '199986'
41
+ :NUMBER_OF_FRAMES-eng: '199986'
42
+ :NUMBER_OF_BYTES: '66861986'
43
+ :NUMBER_OF_BYTES-eng: '66861986'
44
+ :_STATISTICS_WRITING_APP: mkvmerge v8.3.0 ('Over the Horizon') 32bit
45
+ :_STATISTICS_WRITING_APP-eng: mkvmerge v8.3.0 ('Over the Horizon') 32bit
46
+ :_STATISTICS_WRITING_DATE_UTC: '2015-12-04 08:47:49'
47
+ :_STATISTICS_WRITING_DATE_UTC-eng: '2015-12-04 08:47:49'
48
+ :_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
49
+ :_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
@@ -0,0 +1,7 @@
1
+ ---
2
+ :codec_long_name: AAC (Advanced Audio Coding)
3
+ :codec_name: aac
4
+ :codec_type: :audio
5
+ :index: 18
6
+ :language: jpn
7
+ :title: "[AnimeRG] Tenshi No Tamago [1080p] [ScavvyKiD]"
@@ -0,0 +1,43 @@
1
+ ---
2
+ :index: 0
3
+ :codec_name: ass
4
+ :codec_long_name: ASS (Advanced SSA) subtitle
5
+ :codec_type: subtitle
6
+ :codec_time_base: 0/1
7
+ :codec_tag_string: "[0][0][0][0]"
8
+ :codec_tag: '0x0000'
9
+ :r_frame_rate: 0/0
10
+ :avg_frame_rate: 0/0
11
+ :time_base: 1/1000
12
+ :start_pts: 980
13
+ :start_time: '0.980000'
14
+ :disposition:
15
+ :default: 0
16
+ :dub: 0
17
+ :original: 0
18
+ :comment: 0
19
+ :lyrics: 0
20
+ :karaoke: 0
21
+ :forced: 0
22
+ :hearing_impaired: 0
23
+ :visual_impaired: 0
24
+ :clean_effects: 0
25
+ :attached_pic: 0
26
+ :timed_thumbnails: 0
27
+ :tags:
28
+ :language: fre
29
+ :title: French Subs
30
+ :BPS: '19'
31
+ :BPS-eng: '19'
32
+ :DURATION: '01:11:01.020000000'
33
+ :DURATION-eng: '01:11:01.020000000'
34
+ :NUMBER_OF_FRAMES: '134'
35
+ :NUMBER_OF_FRAMES-eng: '134'
36
+ :NUMBER_OF_BYTES: '10267'
37
+ :NUMBER_OF_BYTES-eng: '10267'
38
+ :_STATISTICS_WRITING_APP: mkvmerge v8.3.0 ('Over the Horizon') 32bit
39
+ :_STATISTICS_WRITING_APP-eng: mkvmerge v8.3.0 ('Over the Horizon') 32bit
40
+ :_STATISTICS_WRITING_DATE_UTC: '2015-12-04 08:47:49'
41
+ :_STATISTICS_WRITING_DATE_UTC-eng: '2015-12-04 08:47:49'
42
+ :_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
43
+ :_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
@@ -0,0 +1,7 @@
1
+ ---
2
+ :codec_long_name: ASS (Advanced SSA) subtitle
3
+ :codec_name: ass
4
+ :codec_type: :subtitle
5
+ :index: 0
6
+ :language: fre
7
+ :title: French Subs
@@ -0,0 +1,59 @@
1
+ ---
2
+ :index: 17
3
+ :codec_name: h264
4
+ :codec_long_name: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
5
+ :profile: High
6
+ :codec_type: video
7
+ :codec_time_base: 1001/48000
8
+ :codec_tag_string: "[0][0][0][0]"
9
+ :codec_tag: '0x0000'
10
+ :width: 1920
11
+ :height: 1080
12
+ :coded_width: 1920
13
+ :coded_height: 1088
14
+ :has_b_frames: 2
15
+ :sample_aspect_ratio: '1:1'
16
+ :display_aspect_ratio: '16:9'
17
+ :pix_fmt: yuv420p
18
+ :level: 41
19
+ :chroma_location: left
20
+ :field_order: progressive
21
+ :refs: 1
22
+ :is_avc: 'true'
23
+ :nal_length_size: '4'
24
+ :r_frame_rate: 24000/1001
25
+ :avg_frame_rate: 24000/1001
26
+ :time_base: 1/1000
27
+ :start_pts: 0
28
+ :start_time: '0.000000'
29
+ :bits_per_raw_sample: '8'
30
+ :disposition:
31
+ :default: 1
32
+ :dub: 0
33
+ :original: 0
34
+ :comment: 0
35
+ :lyrics: 0
36
+ :karaoke: 0
37
+ :forced: 0
38
+ :hearing_impaired: 0
39
+ :visual_impaired: 0
40
+ :clean_effects: 0
41
+ :attached_pic: 0
42
+ :timed_thumbnails: 0
43
+ :tags:
44
+ :language: eng
45
+ :title: "[AnimeRG] Tenshi No Tamago [1080p] [ScavvyKiD]"
46
+ :BPS: '3495932'
47
+ :BPS-eng: '3495932'
48
+ :DURATION: '01:11:06.218000000'
49
+ :DURATION-eng: '01:11:06.218000000'
50
+ :NUMBER_OF_FRAMES: '102288'
51
+ :NUMBER_OF_FRAMES-eng: '102288'
52
+ :NUMBER_OF_BYTES: '1864301082'
53
+ :NUMBER_OF_BYTES-eng: '1864301082'
54
+ :_STATISTICS_WRITING_APP: mkvmerge v8.3.0 ('Over the Horizon') 32bit
55
+ :_STATISTICS_WRITING_APP-eng: mkvmerge v8.3.0 ('Over the Horizon') 32bit
56
+ :_STATISTICS_WRITING_DATE_UTC: '2015-12-04 08:47:49'
57
+ :_STATISTICS_WRITING_DATE_UTC-eng: '2015-12-04 08:47:49'
58
+ :_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
59
+ :_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
@@ -0,0 +1,7 @@
1
+ ---
2
+ :codec_long_name: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
3
+ :codec_name: h264
4
+ :codec_type: :video
5
+ :index: 17
6
+ :language: eng
7
+ :title: "[AnimeRG] Tenshi No Tamago [1080p] [ScavvyKiD]"
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ ::EacRubyUtils::Rspec.default_setup.describe_rubocop
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/rspec/default_setup'
4
+ ::EacRubyUtils::Rspec.default_setup_create(::File.expand_path('..', __dir__))
@@ -0,0 +1,44 @@
1
+ FROM ubuntu:18.04
2
+
3
+ ENV DEBIAN_FRONTEND=noninteractive
4
+ ENV USER_UID=1000
5
+ ENV USER_GID=1000
6
+ ENV USERNAME=user
7
+
8
+ # sudo gosu \
9
+
10
+ RUN ln -sf /bin/true /usr/bin/chfn && apt-get update && apt-get install -y \
11
+ libnss3-tools \
12
+ zenity \
13
+ libgtk2.0-0 \
14
+ dbus-x11 \
15
+ yad \
16
+ libcurl3 \
17
+ libdbus-1.3 \
18
+ libxss1 \
19
+ lsb-release \
20
+ net-tools \
21
+ openssl \
22
+ firefox \
23
+ systemd \
24
+ systemd-sysv
25
+
26
+
27
+ ADD https://cloud.gastecnologia.com.br/cef/warsaw/install/GBPCEFwr64.deb /src/warsaw.deb
28
+ RUN groupadd -g ${USER_GID} user && useradd -u ${USER_UID} -g ${USER_GID} -ms /bin/bash user && chown -R user.user /home/user
29
+
30
+ #RUN dpkg -i /w.deb || exit 0
31
+
32
+ COPY context/firefox.service /etc/systemd/system/
33
+ COPY context/startbrowser.sh /usr/local/bin/
34
+
35
+ # systemctl enable warsaw && \
36
+
37
+ RUN mkdir -p /var/run/dbus && \
38
+ systemctl enable firefox && \
39
+ systemctl disable systemd-resolved && systemctl disable systemd-tmpfiles-setup.service
40
+
41
+ STOPSIGNAL SIGRTMIN+3
42
+
43
+
44
+ ENTRYPOINT [ "/sbin/init" ]
@@ -0,0 +1,35 @@
1
+ IMG=jsalatiel/wsbb-podman:latest
2
+ CONTAINER_NAME=wsbb
3
+ DOCKERCMD=sudo podman
4
+
5
+
6
+ USER_UID = $(shell id -u $(USER))
7
+ USER_GID = $(shell id -g $(USER))
8
+ ifeq ($(shell uname),Darwin)
9
+ USER_GID = $(shell id -u $(USER))
10
+ endif
11
+
12
+ build:
13
+ $(DOCKERCMD) build -t ${IMG} .
14
+
15
+ start:
16
+ $(DOCKERCMD) run -d --rm -it --name ${CONTAINER_NAME} \
17
+ --cap-add CAP_AUDIT_WRITE --cap-add CAP_SYS_PTRACE \
18
+ -e USER_UID=$(USER_UID) \
19
+ -e USER_GID=$(USER_GID) \
20
+ -v "$(HOME)/.Xauthority:/home/user/.Xauthority:ro" \
21
+ -v "/tmp/.X11-unix:/tmp/.X11-unix:ro" \
22
+ -v "/etc/machine-id:/etc/machine-id:ro" \
23
+ $(IMG) seg.bb.com.br
24
+ logs:
25
+ $(DOCKERCMD) logs -f ${CONTAINER_NAME}
26
+
27
+ shell:
28
+ $(DOCKERCMD) exec -it ${CONTAINER_NAME} bash
29
+
30
+ stop:
31
+ -$(DOCKERCMD) kill ${CONTAINER_NAME}
32
+
33
+ remove:
34
+ -$(DOCKERCMD) image rm ${CONTAINER_NAME}
35
+
@@ -0,0 +1,16 @@
1
+ # wsbb-podman
2
+ Credits go to farribeiro/wscef-docker and juliohm1978/dockerbb
3
+
4
+
5
+ **make build** to build the container
6
+
7
+ **make start** to run the container ( It may take a while to start firefox - Just wait)
8
+
9
+ When you close firefox the container will be deleted.
10
+
11
+
12
+
13
+
14
+
15
+
16
+
@@ -0,0 +1,8 @@
1
+ [Unit]
2
+
3
+ [Service]
4
+ ExecStart=/usr/local/bin/startbrowser.sh
5
+ Restart=no
6
+
7
+ [Install]
8
+ WantedBy=multi-user.target
@@ -0,0 +1,9 @@
1
+ #!/bin/bash -xe
2
+
3
+ /usr/bin/dpkg -D10 -i /src/warsaw.deb
4
+ systemctl enable --now warsaw
5
+
6
+ runuser -l user -c "XAUTHORITY=/home/user/.Xauthority DISPLAY=:0 firefox --no-remote --new-instance https://seg.bb.com.br"
7
+
8
+ kill -SIGRTMIN+3 1
9
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ehbrs_ruby_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo H. Bogoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-25 00:00:00.000000000 Z
11
+ date: 2021-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eac_ruby_utils
@@ -24,6 +24,26 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.70'
27
+ - !ruby/object:Gem::Dependency
28
+ name: eac_templates
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.1'
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: 0.1.1
37
+ type: :runtime
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - "~>"
42
+ - !ruby/object:Gem::Version
43
+ version: '0.1'
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 0.1.1
27
47
  - !ruby/object:Gem::Dependency
28
48
  name: aranha-parsers
29
49
  requirement: !ruby/object:Gem::Requirement
@@ -58,8 +78,12 @@ executables: []
58
78
  extensions: []
59
79
  extra_rdoc_files: []
60
80
  files:
81
+ - ".rspec"
82
+ - ".rubocop.yml"
61
83
  - lib/ehbrs_ruby_utils.rb
62
84
  - lib/ehbrs_ruby_utils/executables.rb
85
+ - lib/ehbrs_ruby_utils/finances/bb_browser/docker_image.rb
86
+ - lib/ehbrs_ruby_utils/patches/object/template.rb
63
87
  - lib/ehbrs_ruby_utils/version.rb
64
88
  - lib/ehbrs_ruby_utils/videos.rb
65
89
  - lib/ehbrs_ruby_utils/videos/container.rb
@@ -71,7 +95,25 @@ files:
71
95
  - lib/ehbrs_ruby_utils/web_utils/instance.rb
72
96
  - lib/ehbrs_ruby_utils/web_utils/videos.rb
73
97
  - lib/ehbrs_ruby_utils/web_utils/videos/file.rb
98
+ - lib/ehbrs_ruby_utils/web_utils/videos/file/rename.rb
74
99
  - lib/ehbrs_ruby_utils/web_utils/videos/files_list.rb
100
+ - spec/lib/ehbrs_ruby_utils/videos/resolution_spec.rb
101
+ - spec/lib/ehbrs_ruby_utils/videos/stream_spec.rb
102
+ - spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_attachment.source.yaml
103
+ - spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_attachment.target.yaml
104
+ - spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_audio.source.yaml
105
+ - spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_audio.target.yaml
106
+ - spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_subtitle.source.yaml
107
+ - spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_subtitle.target.yaml
108
+ - spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_video.source.yaml
109
+ - spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_video.target.yaml
110
+ - spec/rubocop_check_spec.rb
111
+ - spec/spec_helper.rb
112
+ - template/ehbrs_ruby_utils/finances/bb_browser/docker_image/Dockerfile
113
+ - template/ehbrs_ruby_utils/finances/bb_browser/docker_image/Makefile
114
+ - template/ehbrs_ruby_utils/finances/bb_browser/docker_image/README.md
115
+ - template/ehbrs_ruby_utils/finances/bb_browser/docker_image/context/firefox.service
116
+ - template/ehbrs_ruby_utils/finances/bb_browser/docker_image/context/startbrowser.sh
75
117
  homepage:
76
118
  licenses: []
77
119
  metadata: {}
@@ -94,4 +136,18 @@ rubygems_version: 3.1.6
94
136
  signing_key:
95
137
  specification_version: 4
96
138
  summary: Utilities for EHB/RS's Ruby projects.
97
- test_files: []
139
+ test_files:
140
+ - spec/rubocop_check_spec.rb
141
+ - spec/lib/ehbrs_ruby_utils/videos/stream_spec.rb
142
+ - spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_audio.target.yaml
143
+ - spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_video.target.yaml
144
+ - spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_attachment.target.yaml
145
+ - spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_subtitle.target.yaml
146
+ - spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_audio.source.yaml
147
+ - spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_attachment.source.yaml
148
+ - spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_subtitle.source.yaml
149
+ - spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_video.source.yaml
150
+ - spec/lib/ehbrs_ruby_utils/videos/resolution_spec.rb
151
+ - spec/spec_helper.rb
152
+ - ".rubocop.yml"
153
+ - ".rspec"