vidload 0.5.1 → 0.5.2

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: 886c9c18b30408aa459ab4e8e96d76e372fbe72f4438aa57c9cdd2b43b6360ee
4
- data.tar.gz: e86001695c92d38311bf54bf0cc80d81d2bea7a69472bdca60a5f479816b1cc2
3
+ metadata.gz: 3092d67b3046f5a255710845e166ab47d2c4d6eadc9a603001771363227fc3b9
4
+ data.tar.gz: bc42d9546184abcc2637d41a05e94f3f8f581b517f7fbc81df08932607ebc931
5
5
  SHA512:
6
- metadata.gz: 1cb6f48253b09248683b2116206004a1178e8bf6784416c368dca01f6530034491c51f9ca8b1237fd40e1e7a63ef55da31db61939f405283cde63ce65a5725c3
7
- data.tar.gz: '048a4b987dde44897ccfe5c6941074df9a43514b26afd43398d66ccf481ec497f14ceb03222b0c36d9d7426c9fd57a80a2aef09c8c5ba927da7e1ecb059bad86'
6
+ metadata.gz: b32af013de67e432e82eb8251f832c1b4b20987e7d18f53c9266be2b07cfb1c8e5874c3995a69c8aa10d086e29041fc0b7ae4c3b8c50a4a3248ede8e6f522ec6
7
+ data.tar.gz: 896e071941553db10572c8ccbd40b0972bfdf50b61dacd00e363a51f33f212d055c01cfa790cd615dbef5dea7f0be95e5530283972a81926e6633d7b21ef8f95
@@ -162,14 +162,15 @@ module Vidload
162
162
  navigate_to_url(@kwargs[:video_url], page)
163
163
  video_starter_callbacks.each do |callback|
164
164
  res = callback.call(page)
165
- @kwargs[:video_name] = !@kwargs[:video_name] && res[:video_name] ? res[:video_name] : 'unknown_name'
166
- if !@kwargs[:author_name] && res[:author_name]
167
- @kwargs[:author_name] = res[:author_name]
168
- @kwargs[:video_name] = "#{@kwargs[:author_name]}_#{@kwargs[:video_name]}"
165
+ if !@kwargs[:video_name] && res[:video_name]
166
+ @kwargs[:video_name] = res[:video_name]
167
+ @kwargs[:video_name] = LuckyCase.dash_case(@kwargs[:video_name].gsub(/[^[:alnum:] ]/, ''))
169
168
  end
169
+ next unless !@kwargs[:author_name] && res[:author_name]
170
170
 
171
- @kwargs[:video_name] = LuckyCase.dash_case(@kwargs[:video_name].gsub(/[^[:alnum:] ]/, ''))
171
+ @kwargs[:author_name] = res[:author_name]
172
172
  @kwargs[:author_name] = LuckyCase.dash_case(@kwargs[:author_name].gsub(/[^[:alnum:] ]/, ''))
173
+ @kwargs[:video_name] = "#{@kwargs[:author_name]}_#{@kwargs[:video_name]}"
173
174
  end
174
175
  end
175
176
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Vidload
4
- VERSION = '0.5.1'
4
+ VERSION = '0.5.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vidload
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patacode <pata.codegineer@gmail.com>