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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 06e7be65305bac08f73eb43c881dd2527467ba73
4
- data.tar.gz: 899718fd19305a6403afdb323962272a104e6a24
3
+ metadata.gz: 6f871ed15e269c05860f9784244e7b8a8b50f233
4
+ data.tar.gz: de5a4e5606cba55abaedb53936d42a1099ccdef9
5
5
  SHA512:
6
- metadata.gz: 0c4a12fde5f32a50e5f0088f62c88250f318f3f79d51bc64bc4c98d78316bae84595415968b7a088d007ffb239032c23adf61e5bb83d80a8adcc458ee3e44583
7
- data.tar.gz: 963a46ce16a4b1b161b503b486409bea3091268040e83aac1a44cace3d4b4d2c1e4ba4e74fcc7a3b201990d098f98adc320f5c576374bde5983d4bde1aaf004b
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
  [![Build Status](https://travis-ci.org/layer8x/youtube-dl.rb.svg?branch=master)](https://travis-ci.org/layer8x/youtube-dl.rb)
6
6
  [![Code Climate](https://codeclimate.com/github/layer8x/youtube-dl.rb/badges/gpa.svg)](https://codeclimate.com/github/layer8x/youtube-dl.rb)
7
7
  [![Test Coverage](https://codeclimate.com/github/layer8x/youtube-dl.rb/badges/coverage.svg)](https://codeclimate.com/github/layer8x/youtube-dl.rb/coverage)
8
+ [![Stories in Ready](https://badge.waffle.io/layer8x/youtube-dl.rb.svg?label=ready&title=Ready)](http://waffle.io/layer8x/youtube-dl.rb)
8
9
 
9
10
  ## Install the gem
10
11
 
@@ -1,3 +1,3 @@
1
1
  module YoutubeDL
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
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
- NOPE = "https://www.youtube.com/watch?v=gvdf5n-zI14"
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(NOPE)
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 = 'nope.avi'
45
+ @runner.options.output = TEST_FILENAME
46
+ @runner.options.format = TEST_FORMAT
46
47
  @runner.run
47
- assert File.exists? 'nope.avi'
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(NOPE, {some_key: 'some value'})
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 NOPE, output: 'nope.avi'
10
- assert File.exist? 'nope.avi'
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 [NOPE, "https://www.youtube.com/watch?v=Mt0PUjh-nDM"]
14
+ YoutubeDL.download [TEST_URL, TEST_URL2]
15
15
  assert_equal Dir.glob('nope*').length, 2
16
16
  end
17
17
  end
Binary file
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
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-07-23 00:00:00.000000000 Z
12
+ date: 2015-08-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cocaine