multi_video_streaming 1.0.0.beta3 → 1.0.0.beta5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: acf42e8d2007eef149c4dcdd7d7d7e03af262560a55bb81ff54c6a918b08f6bc
4
- data.tar.gz: cbe6379565d1ed0725390656eeefa3c66aae23e9ea20e20441060570d59c8792
3
+ metadata.gz: 66dd2171f16c6cfacdddc230c2f2122ceed37f5d4739540743afd3f6478303bd
4
+ data.tar.gz: b47cb8a2807fdbcbeb56985eaf6a5ddbb7fe1e280276301215a0fea0246a8fec
5
5
  SHA512:
6
- metadata.gz: 7ac96bdf4b26d0be4bac76b78b709628a446ae48a95c263bb04256482173447a335427fe0bb0d8c0bf1a8c4355d1d47a1dab2ee7941926d94b1dc2512310a149
7
- data.tar.gz: 9064f855a2f808e9fb415998536af588c49fe660b07cca011be2ff805f5e1911ccf114916b6fc8de9fa64009fc92cbb97b881d0bce408d13af61f3ecdd42df17
6
+ metadata.gz: 989c997d0b1e48b832f6ee95d3bbfba84d86971fb3fb587d75fd0e39c14f523662b3d05c6a00aa190d511017ae5eb458e0431855197ceb26a856d73fe1508b2a
7
+ data.tar.gz: 19695f2aa48883060e6b83a98e02996fb52c8b2f2074cd272ef2373703c5c0ce5576855177861cafd2e8cc7b63796dc3202060c1424b25e204d1407dfec42dcd
@@ -29,7 +29,7 @@ module MultiVideoStreaming
29
29
  response = Aws::S3::Resource.new().bucket(bucket).object(video_id)
30
30
  video_url = response.public_url
31
31
 
32
- url_signed = MultiVideoStreaming::Utils::S3.generate_presign_url(bucket: bucket, key: video_id)
32
+ url_signed = MultiVideoStreaming::Utils::S3.generate_presign_url(method: :get, bucket: bucket, key: video_id)
33
33
  data = {
34
34
  "key": response.key,
35
35
  "title": response.key,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MultiVideoStreaming
4
- VERSION = "1.0.0.beta3"
4
+ VERSION = "1.0.0.beta5"
5
5
  end
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'thread'
4
- require 'thwait'
5
3
  require "uri"
6
4
  require "net/http"
7
5
  require "openssl"
@@ -22,8 +20,6 @@ require "multi_video_streaming/validators"
22
20
 
23
21
  module MultiVideoStreaming
24
22
  def self.upload(url, *platforms)
25
- threads = []
26
-
27
23
  MultiVideoStreaming::Validators::PlatformsArrayValidator.validate(platforms_array: platforms)
28
24
  MultiVideoStreaming::Validators::PlatformsHashValidator.validate(platforms_hash: platforms, method: :create, number_of_platforms: platforms.length)
29
25
 
@@ -32,19 +28,16 @@ module MultiVideoStreaming
32
28
  https_service_instance = MultiVideoStreaming::Services::Https.new
33
29
 
34
30
  platforms.each do |platform|
35
- threads << Thread.new {
36
- platform_instance = MultiVideoStreaming::Factories::Drive.get_platform_instance(
37
- platform_name: platform[:platform_name],
38
- dependency_params: platform[:dependency_params],
39
- response_instance: response_instance,
40
- required_fields_validator_instance: required_fields_validator_instance,
41
- https_service_instance: https_service_instance
42
- )
43
- platform_instance.upload_video(url: url)
44
- }
31
+ platform_instance = MultiVideoStreaming::Factories::Drive.get_platform_instance(
32
+ platform_name: platform[:platform_name],
33
+ dependency_params: platform[:dependency_params],
34
+ response_instance: response_instance,
35
+ required_fields_validator_instance: required_fields_validator_instance,
36
+ https_service_instance: https_service_instance
37
+ )
38
+ platform_instance.upload_video(url: url)
45
39
  end
46
40
 
47
- ThreadsWait.all_waits(*threads)
48
41
  response_instance.get_all_response
49
42
  end
50
43
 
@@ -77,8 +70,6 @@ module MultiVideoStreaming
77
70
  end
78
71
 
79
72
  def self.delete(*platforms)
80
- threads = []
81
-
82
73
  MultiVideoStreaming::Validators::PlatformsArrayValidator.validate(platforms_array: platforms)
83
74
  MultiVideoStreaming::Validators::PlatformsHashValidator.validate(platforms_hash: platforms, method: :get, number_of_platforms: platforms.length)
84
75
 
@@ -87,19 +78,15 @@ module MultiVideoStreaming
87
78
  https_service_instance = MultiVideoStreaming::Services::Https.new
88
79
 
89
80
  platforms.each do |platform|
90
- threads << Thread.new {
91
- platform_instance = MultiVideoStreaming::Factories::Drive.get_platform_instance(
92
- platform_name: platform[:platform_name],
93
- dependency_params: platform[:dependency_params],
94
- response_instance: response_instance,
95
- required_fields_validator_instance: required_fields_validator_instance,
96
- https_service_instance: https_service_instance
97
- )
98
- platform_instance.delete_video
99
- }
81
+ platform_instance = MultiVideoStreaming::Factories::Drive.get_platform_instance(
82
+ platform_name: platform[:platform_name],
83
+ dependency_params: platform[:dependency_params],
84
+ response_instance: response_instance,
85
+ required_fields_validator_instance: required_fields_validator_instance,
86
+ https_service_instance: https_service_instance
87
+ )
88
+ platform_instance.delete_video
100
89
  end
101
-
102
- ThreadsWait.all_waits(*threads)
103
90
  response_instance.get_all_response
104
91
  end
105
92
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multi_video_streaming
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta3
4
+ version: 1.0.0.beta5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henrique Schmeller
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-10-04 00:00:00.000000000 Z
13
+ date: 2022-10-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec