yt 0.8.3 → 0.8.4

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: fd5d7adb4f5c9a5cce9d5aa7988594c447bdbbaf
4
- data.tar.gz: 920b28b819d0d154ef3e5668378ffdfdac0fb53d
3
+ metadata.gz: 7d824701c27d2369e03c760e042cfe19dbd39470
4
+ data.tar.gz: 63ff1fa70040d3d8500e04505816d5ceb2bc0779
5
5
  SHA512:
6
- metadata.gz: f0bbbe167612926e3d0f6be004d54fc97bedc57f315089e27864a421bd839ae908f8af714a1d393e6c69a4a02a8124958f808a41eb94fe9f2850a079875a1e33
7
- data.tar.gz: fc5be7fdfff6dd49919aba6e18dfdb3893ba81bd9382429949dda92c8a81219bb48b2b6d0ab3547029bbcb048d58220e30004bf5f2622ba25da3dad37c83ab18
6
+ metadata.gz: 9168b327cc1dbb9a37f14eb764c0311a2b42b21c23eac6b08b3e8deede02de23105778f1f36e9cf454b00ae3ab759963db53b8b7f47733ca28582ae838330947
7
+ data.tar.gz: 047a62222b0f27367bf2287afed2c5d69908497d03245e1fbce64705268e74161239af4ebf131640c8f587e06af8674c3eb88d1f463ddb4e949567f04ef7748f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- yt (0.8.3)
4
+ yt (0.8.4)
5
5
  activesupport
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -41,7 +41,7 @@ To install on your system, run
41
41
 
42
42
  To use inside a bundled Ruby project, add this line to the Gemfile:
43
43
 
44
- gem 'yt', '~> 0.8.3'
44
+ gem 'yt', '~> 0.8.4'
45
45
 
46
46
  Since the gem follows [Semantic Versioning](http://semver.org),
47
47
  indicating the full version in your Gemfile (~> *major*.*minor*.*patch*)
@@ -113,6 +113,7 @@ module Yt
113
113
 
114
114
  def timestamp_of(position)
115
115
  regex = %r{(?:|(?<hours>\d*):)(?:|(?<min>\d*):)(?<sec>\d*)\.(?<ms>\d*)}
116
+ position['t'] = '00:00:00.000' if position['t'] == '0'
116
117
  match = position['t'].match regex
117
118
  hours = (match[:hours] || '0').to_i
118
119
  minutes = (match[:min] || '0').to_i
data/lib/yt/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Yt
2
- VERSION = '0.8.3'
2
+ VERSION = '0.8.4'
3
3
  end
@@ -157,5 +157,17 @@ describe Yt::Annotation do
157
157
  it { expect(annotation.starts_after? 0).to be_nil }
158
158
  it { expect(annotation.starts_before? 0).to be_nil }
159
159
  end
160
+
161
+ context 'given an annotation with "0" as the timestamp' do
162
+ let(:xml) { %Q{
163
+ <segment>
164
+ <movingRegion type="rect">
165
+ <rectRegion h="6.0" t="0" w="25.0" x="7.0" y="5.0"/>
166
+ </movingRegion>
167
+ </segment>
168
+ } }
169
+ it { expect(annotation.starts_after? 10).to be_falsey }
170
+ it { expect(annotation.starts_before? 10).to be true }
171
+ end
160
172
  end
161
173
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3
4
+ version: 0.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claudio Baccigalupo