wgif 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/wgif/version.rb +1 -1
- data/lib/wgif/video.rb +1 -1
- data/spec/unit/wgif/downloader_spec.rb +4 -1
- data/spec/unit/wgif/video_spec.rb +14 -1
- data/wgif.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1010f88fc3bcf4944869c254a9f6da6cba507522
|
4
|
+
data.tar.gz: 5814606e027cb5da0560379f0186bd9ac26a3623
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb0ae4bebe73f9e239b31baa3d521e8c1d81c452edd3545d0cae3923ea147e3b35d6dbb3859d8c5da6229287308232982c5b5e5cb688a1ffb4dacc1a9cbbd509
|
7
|
+
data.tar.gz: 3169b600b24e5d12fa6609b4eb8d59b21e5ad06f31582aead56e9730859012121b50007f4bdfecc4aa41a2efdb6ef33764e9c1e0d684cea49eddb50c4c599878
|
data/README.md
CHANGED
@@ -114,6 +114,7 @@ And here it is:
|
|
114
114
|
### "You shouldn't let poets lie to you."
|
115
115
|
|
116
116
|
## Changes
|
117
|
+
- v0.5.3, 2015/7/26: Fix sort order of globbed frames. ([Issue #19](https://github.com/ecmendenhall/wgif/issues/19)
|
117
118
|
- v0.5.2, 2015/1/24: Use `/usr/bin/env ruby` in binary.
|
118
119
|
- v0.5.1, 2014/8/15: Lock down dependency versions.
|
119
120
|
- v0.5.0, 2014/8/15: Add support for sub-second timestamps in `--start` and `--duration` flags ([Issue #13](https://github.com/ecmendenhall/wgif/issues/13)).
|
data/lib/wgif/version.rb
CHANGED
data/lib/wgif/video.rb
CHANGED
@@ -23,7 +23,10 @@ describe WGif::Downloader do
|
|
23
23
|
|
24
24
|
it 'throws an error if the video is not found' do
|
25
25
|
expect(ViddlRb).to receive(:get_urls).with(clip_url)
|
26
|
-
.and_return(['
|
26
|
+
.and_return(['not a url'])
|
27
|
+
fake_response = double(response_code: 404)
|
28
|
+
fake_request = double(run: fake_response).as_null_object
|
29
|
+
allow(Typhoeus::Request).to receive(:new).and_return(fake_request)
|
27
30
|
expect { downloader.get_video(clip_url) }
|
28
31
|
.to raise_error(WGif::VideoNotFoundException)
|
29
32
|
end
|
@@ -51,7 +51,8 @@ describe WGif::Video do
|
|
51
51
|
expect(clip).to receive(:transcode).with(frames, options)
|
52
52
|
allow(FileUtils).to receive(:rm)
|
53
53
|
expect(clip).to receive(:duration).and_return 2
|
54
|
-
expect(Dir).to receive(:glob).with('/tmp/wgif/frames/*.png')
|
54
|
+
expect(Dir).to receive(:glob).with('/tmp/wgif/frames/*.png')
|
55
|
+
.twice.and_return([])
|
55
56
|
video = described_class.new 'bjork', '/tmp/wgif/bjork.mp4'
|
56
57
|
video.to_frames(frames: 10)
|
57
58
|
end
|
@@ -78,4 +79,16 @@ describe WGif::Video do
|
|
78
79
|
expect { video.trim('00:00:00', 5.0) }
|
79
80
|
.to raise_error(WGif::ClipEncodingException)
|
80
81
|
end
|
82
|
+
|
83
|
+
it 'sorts frames in lexicographic order' do
|
84
|
+
frames = '/tmp/wgif/frames/%5d.png'
|
85
|
+
options = '-vf fps=24'
|
86
|
+
expect(clip).to receive(:transcode).with(frames, options)
|
87
|
+
allow(FileUtils).to receive(:rm)
|
88
|
+
unsorted_files = ['001.png', '003.png', '002.png']
|
89
|
+
expect(Dir).to receive(:glob).with('/tmp/wgif/frames/*.png')
|
90
|
+
.twice.and_return(unsorted_files)
|
91
|
+
video = described_class.new 'bjork', '/tmp/wgif/bjork.mp4'
|
92
|
+
expect(video.to_frames).to eq(['001.png', '002.png', '003.png'])
|
93
|
+
end
|
81
94
|
end
|
data/wgif.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_dependency 'ruby-progressbar', '1.5.1'
|
23
23
|
spec.add_dependency 'streamio-ffmpeg', '1.0.0'
|
24
24
|
spec.add_dependency 'typhoeus', '~> 0.6'
|
25
|
-
spec.add_dependency 'viddl-rb', '1.0
|
25
|
+
spec.add_dependency 'viddl-rb', '1.1.0'
|
26
26
|
|
27
27
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
28
28
|
spec.add_development_dependency 'codeclimate-test-reporter', '~> 0.3'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wgif
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Connor Mendenhall
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rmagick
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.0
|
75
|
+
version: 1.1.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.0
|
82
|
+
version: 1.1.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: bundler
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|