ooyala-rails 0.3.1 → 0.3.2

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: 22705b2375b78cd9ba75c03509d1deb1260a4117
4
- data.tar.gz: 192becb8f0bac9c26bb43bac7b31feac273c200c
3
+ metadata.gz: ab721a5ab07f725f1d7b42d7642a59410fa78d03
4
+ data.tar.gz: fe1723e84b0c71965398df34bfd678abffa8756c
5
5
  SHA512:
6
- metadata.gz: 0722cce484e2b9f3a13eff5b161411ae53f45ede43341f490b150d66515b6dad01722782289a815bbaa90c0259b6d99a6d09ff632619c9f521422b025581d732
7
- data.tar.gz: 8899b6a36523fb02047b460515fae4abd2d70b04c250fc28a24cde5269f81d658a5f7dcc788d8ec1abbf9d04bd37f9dd1dc7867af7da6f85cf900402c3cfdd19
6
+ metadata.gz: 416845241a4e4e986935ca5a2876b1b3d722ddd1312bfc0ab2bf70e6066b5903b84ba380fee98f3ca274bdc1c805113f9db9f6766014ceb6c0a68e3d9937346d
7
+ data.tar.gz: 1fe12a1b22592bfbe25b65ffab20cf14b9ebfb73eecedd5adad2b0feeecd4b8f914558233edd3781479a788ae003b6e36989bf26c87a36faa1d3fa259f577fe8
@@ -1,5 +1,5 @@
1
1
  module Ooyala
2
2
  module Rails
3
- VERSION = '0.3.1'
3
+ VERSION = '0.3.2'
4
4
  end
5
5
  end
@@ -26,9 +26,10 @@ module Ooyala
26
26
  end
27
27
 
28
28
  def duration
29
- return unless duration_in_seconds
30
- mins = (duration_in_seconds / 60.0).floor
31
- secs = duration_in_seconds % 60
29
+ return unless duration_in_ms
30
+ total_seconds = duration_in_ms / 1_000.0
31
+ mins = (total_seconds / 60.0).floor
32
+ secs = (total_seconds % 60).ceil
32
33
  '%s:%s' % [mins, secs]
33
34
  end
34
35
 
@@ -48,7 +49,7 @@ module Ooyala
48
49
  end
49
50
  end
50
51
 
51
- def duration_in_seconds
52
+ def duration_in_ms
52
53
  data['duration'] if data
53
54
  end
54
55
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ooyala-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zubin Henner