m3u8 0.6.6 → 0.6.7

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: 59afb153649738feaf50a0c63229cce241a3be9e
4
- data.tar.gz: 56d7ee49319b9be6d6feecb3c9b591e5461b8402
3
+ metadata.gz: 692b6b95751961d33c5a99b902815343faa94ef8
4
+ data.tar.gz: 5e9fe6ceb3d9f9d3210880e5df34ab0c44082cea
5
5
  SHA512:
6
- metadata.gz: 153894fa6fc82485c37cd5f67f8126d7692d1f22bb74c8afb94b2586f2dbd311ed2d2f63df5f62dbe9bd89fd94bfcad19f2efead08a4929893df365470b24085
7
- data.tar.gz: 4b642321d954e3ac44598052ae0c44164bfdf6f22c46e95ab4f03674cbc43244006dd6cfc35d901128c31b1ca9571e56718960753e687c7754cbc574389e8cab
6
+ metadata.gz: 9cbc51a229e659aa49f09794c5825eca8be24e47462e0bfc74484391640bc4d1e497b139a0e8c475a4880b572d723fe9cef0638e702a18b0a1ef69f8ef4d5546
7
+ data.tar.gz: bbff2a3695684af2113554fec5bc8b6b55535c1d188fd22ab7faf9374a6c88319f3f7d7b4660e9ca44c722e8e85f3949d8b1d78cd8cef62c2bbc39737ca8ec44
data/CHANGELOG.md CHANGED
@@ -1,3 +1,5 @@
1
+ #### 0.6.7 (4/8/2016) - Merged pull request #15 from [jviney](https://github.com/jviney). Fix: Always render the duration as a decimal integer.
2
+
1
3
  #### 0.6.6 (3/30/2016) - Merged pull request #14 from [raphi](https://github.com/raphi). Adds support for non-standard name attribute on #EXT-X-STREAM-INF tags.
2
4
 
3
5
  #### 0.6.5 (3/18/2016) - Merged pull requests #11 from [jviney](https://github.com/jviney). Adds codec string for main profile level 4.1.
data/lib/m3u8/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # M3u8 provides parsing, generation, and validation of m3u8 playlists
2
2
  module M3u8
3
- VERSION = '0.6.6'
3
+ VERSION = '0.6.7'
4
4
  end
data/lib/m3u8/writer.rb CHANGED
@@ -34,11 +34,15 @@ module M3u8
34
34
  io.puts '#EXT-X-I-FRAMES-ONLY' if playlist.iframes_only
35
35
  io.puts "#EXT-X-MEDIA-SEQUENCE:#{playlist.sequence}"
36
36
  io.puts "#EXT-X-ALLOW-CACHE:#{cache(playlist)}"
37
- io.puts "#EXT-X-TARGETDURATION:#{playlist.target}"
37
+ io.puts target_duration_format(playlist)
38
38
  end
39
39
 
40
40
  def cache(playlist)
41
41
  playlist.cache ? 'YES' : 'NO'
42
42
  end
43
+
44
+ def target_duration_format(playlist)
45
+ format('#EXT-X-TARGETDURATION:%d', playlist.target)
46
+ end
43
47
  end
44
48
  end
@@ -147,6 +147,14 @@ describe M3u8::Writer do
147
147
  expect(io.string).to eq output
148
148
  end
149
149
 
150
+ it 'should render the target duration as a decimal-integer' do
151
+ playlist = M3u8::Playlist.new(target: 6.2)
152
+ io = StringIO.open
153
+ writer = M3u8::Writer.new io
154
+ writer.write playlist
155
+ expect(io.string).to include('#EXT-X-TARGETDURATION:6')
156
+ end
157
+
150
158
  it 'should raise error on write if item types are mixed' do
151
159
  playlist = M3u8::Playlist.new
152
160
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: m3u8
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.6
4
+ version: 0.6.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Deckard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-30 00:00:00.000000000 Z
11
+ date: 2016-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler