multi_video_streaming 1.0.1.beta5 → 1.0.1.beta7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d489f8518b10a050008834c01fe426e1f8db20a2557de1103a0ca5ce5e1aecf
4
- data.tar.gz: 01051ebe2517a2c44ad03c8256c7a0ebd4b0a20caa03abe25ede00a3b0f42326
3
+ metadata.gz: d0e18d06efadfddb7f8a2efd4e514619bb0b11f19d44da833296f71e3f4e0e6c
4
+ data.tar.gz: 409a59617a2dc9934b269995e2911d92cd0777a0794f227bde63ad2d81902b04
5
5
  SHA512:
6
- metadata.gz: ec90b96d812c60c2bc9be83ed2da13d5184be2795bb3ba1290fc7dd9a11567da0661302231dc95e7864774845e81b3193ca709c6748535ec773b6cb9340dd30f
7
- data.tar.gz: 6955f4aaac3e3aa2d87cb30aa0e8005559fcaab21bd27a0a85713405bfdd40074599749fe8dff5439903fbdd8fc3c642013b9a1d8e39d0867d002518cf506f47
6
+ metadata.gz: a3b6862e9ef60abe5fbb1c2ed2f175b8382722ccb2c769ac94150e42736b5bc8eb0ded0088d229e401d6e6ccf0688ad3181d80797af56df24c7b42a901bc450e
7
+ data.tar.gz: 21ba46a4714382b00807dbbc32034ce36877d7fb5070d210f45d9f7afd6edbc3f750bebe51397abf0d56718f630d4158b0966d68b3eecb38b65d33963e697261
@@ -24,14 +24,13 @@ module MultiVideoStreaming
24
24
 
25
25
  BASE_URL = "https://video.bunnycdn.com"
26
26
 
27
- def upload_video(url:)
27
+ def upload_video(url:, title:)
28
28
  begin
29
29
  library_id, api_key = self.dependency_params.values_at(:library_id, :api_key)
30
30
  @original_status_code = nil
31
31
 
32
32
  self.required_fields_validator_instance.validate(library_id: library_id, api_key: api_key)
33
33
 
34
- title = MultiVideoStreaming::Helpers::TitleFromUrl.get(url: url)
35
34
  create_video_response = self.https_service_instance.post(uri: "#{BASE_URL}/library/#{library_id}/videos", headers: { :AccessKey => api_key }, body: { :title => title })
36
35
 
37
36
  if create_video_response["status_code"] != 200
@@ -27,10 +27,9 @@ module MultiVideoStreaming
27
27
 
28
28
  VIMEO_URL = "https://api.vimeo.com"
29
29
 
30
- def upload_video(url:)
30
+ def upload_video(url:, title:)
31
31
  begin
32
32
  token = self.dependency_params[:token]
33
- title = MultiVideoStreaming::Helpers::TitleFromUrl.get(url: url)
34
33
  @original_status_code = nil
35
34
 
36
35
  self.required_fields_validator_instance.validate(token: token)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MultiVideoStreaming
4
- VERSION = "1.0.1.beta5"
4
+ VERSION = "1.0.1.beta7"
5
5
  end
@@ -19,7 +19,7 @@ require "multi_video_streaming/version"
19
19
  require "multi_video_streaming/validators"
20
20
 
21
21
  module MultiVideoStreaming
22
- def self.upload(url, *platforms)
22
+ def self.upload(url, title, *platforms)
23
23
  MultiVideoStreaming::Validators::PlatformsArrayValidator.validate(platforms_array: platforms)
24
24
  MultiVideoStreaming::Validators::PlatformsHashValidator.validate(platforms_hash: platforms, method: :create, number_of_platforms: platforms.length)
25
25
 
@@ -35,7 +35,7 @@ module MultiVideoStreaming
35
35
  required_fields_validator_instance: required_fields_validator_instance,
36
36
  https_service_instance: https_service_instance
37
37
  )
38
- platform_instance.upload_video(url: url)
38
+ platform_instance.upload_video(url: url, title: title)
39
39
  end
40
40
 
41
41
  response_instance.get_all_response
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.1.beta5
4
+ version: 1.0.1.beta7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henrique Schmeller
@@ -91,7 +91,6 @@ files:
91
91
  - lib/multi_video_streaming/helpers.rb
92
92
  - lib/multi_video_streaming/helpers/get_default_error_message.rb
93
93
  - lib/multi_video_streaming/helpers/sort_files_array_by_label.rb
94
- - lib/multi_video_streaming/helpers/title_from_url.rb
95
94
  - lib/multi_video_streaming/platforms_support.rb
96
95
  - lib/multi_video_streaming/protocols.rb
97
96
  - lib/multi_video_streaming/protocols/https.rb
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module MultiVideoStreaming
4
- module Helpers
5
- class TitleFromUrl
6
- def self.get(url:)
7
- URI(url.to_s).path.split('/').last
8
- end
9
- end
10
- end
11
- end