youtube-dl.rb 0.0.4 → 0.0.5
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 +4 -4
- data/README.md +1 -0
- data/lib/youtube-dl/version.rb +1 -1
- data/test/test_helper.rb +4 -1
- data/test/youtube-dl/runner_test.rb +5 -4
- data/test/youtube-dl/youtube-dl_test.rb +3 -3
- data/vendor/bin/youtube-dl +0 -0
- data/vendor/bin/youtube-dl.exe +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f871ed15e269c05860f9784244e7b8a8b50f233
|
4
|
+
data.tar.gz: de5a4e5606cba55abaedb53936d42a1099ccdef9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fadfe8fca0a98fd27690767f657e0b7e9174c725b3a8b29846dbfd4c7cc167165dad6115cd352f76ef8b88709a48cce9e806f2e344bd4215eb79c2c66fc2c2b
|
7
|
+
data.tar.gz: 049911e6cbea32b12ff588d19f881814ad42f5ee4ce726c9984e0c2d93b51fcadb05a9fd0189b88b00ba78c548c188006fde20a888129893f5ea0846e7590b4e
|
data/README.md
CHANGED
@@ -5,6 +5,7 @@ Ruby wrapper for [youtube-dl](http://rg3.github.io/youtube-dl/).
|
|
5
5
|
[](https://travis-ci.org/layer8x/youtube-dl.rb)
|
6
6
|
[](https://codeclimate.com/github/layer8x/youtube-dl.rb)
|
7
7
|
[](https://codeclimate.com/github/layer8x/youtube-dl.rb/coverage)
|
8
|
+
[](http://waffle.io/layer8x/youtube-dl.rb)
|
8
9
|
|
9
10
|
## Install the gem
|
10
11
|
|
data/lib/youtube-dl/version.rb
CHANGED
data/test/test_helper.rb
CHANGED
@@ -13,7 +13,10 @@ require 'pry'
|
|
13
13
|
|
14
14
|
require_relative '../lib/youtube-dl.rb'
|
15
15
|
|
16
|
-
|
16
|
+
TEST_URL = "https://www.youtube.com/watch?v=gvdf5n-zI14"
|
17
|
+
TEST_URL2 = "https://www.youtube.com/watch?v=Mt0PUjh-nDM"
|
18
|
+
TEST_FILENAME = "nope.avi.mp4"
|
19
|
+
TEST_FORMAT = "5"
|
17
20
|
|
18
21
|
def remove_downloaded_files
|
19
22
|
Dir.glob("**/nope*").each do |nope|
|
@@ -2,7 +2,7 @@ require_relative '../test_helper'
|
|
2
2
|
|
3
3
|
describe YoutubeDL::Runner do
|
4
4
|
before do
|
5
|
-
@runner = YoutubeDL::Runner.new(
|
5
|
+
@runner = YoutubeDL::Runner.new(TEST_URL)
|
6
6
|
end
|
7
7
|
|
8
8
|
after do
|
@@ -42,13 +42,14 @@ describe YoutubeDL::Runner do
|
|
42
42
|
end
|
43
43
|
|
44
44
|
it 'should run commands' do
|
45
|
-
@runner.options.output =
|
45
|
+
@runner.options.output = TEST_FILENAME
|
46
|
+
@runner.options.format = TEST_FORMAT
|
46
47
|
@runner.run
|
47
|
-
assert File.exists?
|
48
|
+
assert File.exists? TEST_FILENAME
|
48
49
|
end
|
49
50
|
|
50
51
|
it 'should take options as a hash yet still have configuration blocks work' do
|
51
|
-
r = YoutubeDL::Runner.new(
|
52
|
+
r = YoutubeDL::Runner.new(TEST_URL, {some_key: 'some value'})
|
52
53
|
r.options.configure do |c|
|
53
54
|
c.another_key = 'another_value'
|
54
55
|
end
|
@@ -6,12 +6,12 @@ describe YoutubeDL do
|
|
6
6
|
end
|
7
7
|
|
8
8
|
it 'should download videos' do
|
9
|
-
YoutubeDL.get
|
10
|
-
assert File.exist?
|
9
|
+
YoutubeDL.get TEST_URL, output: TEST_FILENAME, format: TEST_FORMAT
|
10
|
+
assert File.exist? TEST_FILENAME
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should download multiple videos' do
|
14
|
-
YoutubeDL.download [
|
14
|
+
YoutubeDL.download [TEST_URL, TEST_URL2]
|
15
15
|
assert_equal Dir.glob('nope*').length, 2
|
16
16
|
end
|
17
17
|
end
|
data/vendor/bin/youtube-dl
CHANGED
Binary file
|
data/vendor/bin/youtube-dl.exe
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: youtube-dl.rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sapslaj
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-08-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cocaine
|