moving_words 0.0.2 → 0.0.3
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 +4 -4
- data/CHANGELOG +4 -0
- data/lib/moving_words/caption_block.rb +1 -1
- data/lib/moving_words/version.rb +1 -1
- data/spec/caption_block_spec.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6cfc5c2f48a12b042dfc837c801f6622cce22c15
|
4
|
+
data.tar.gz: 282b744e77155dd15ff403a81a241fad29117ccf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b573d3989cabcb943cbc696805548df4598a9388c2b435e54286d477ed9aa4c8267e2b538ebdde23cb9e315b796092848dc9054c15fe8ab4a26269e5d7984c9a
|
7
|
+
data.tar.gz: 5e27c76c9a3e240fe4dd9d2ef35bbb524190adb451fdf4a46112c1166d80e6fd9fd489e9b9728ca740f6c546e677d11cad78736e16ca88a6ef866c81b9a000e4
|
data/CHANGELOG
CHANGED
@@ -37,7 +37,7 @@ module MovingWords
|
|
37
37
|
# => "3:04:35"
|
38
38
|
def self.human_offset(offset_in_milliseconds, options = {})
|
39
39
|
hours = offset_in_milliseconds / 3600000
|
40
|
-
minutes = (offset_in_milliseconds %
|
40
|
+
minutes = (offset_in_milliseconds % 3600000) / 60000
|
41
41
|
seconds = (offset_in_milliseconds % 60000) / 1000
|
42
42
|
milliseconds = offset_in_milliseconds % 1000
|
43
43
|
|
data/lib/moving_words/version.rb
CHANGED
data/spec/caption_block_spec.rb
CHANGED
@@ -2,11 +2,15 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
module MovingWords
|
4
4
|
describe CaptionBlock do
|
5
|
-
describe ".
|
5
|
+
describe ".human_offset" do
|
6
6
|
it "handles times with minutes without showing hours" do
|
7
7
|
expect(CaptionBlock.human_offset(132212)).to eq("2:12")
|
8
8
|
end
|
9
9
|
|
10
|
+
it "handles times over 6 minutes without wrapping" do
|
11
|
+
expect(CaptionBlock.human_offset(728419)).to eq("12:08")
|
12
|
+
end
|
13
|
+
|
10
14
|
it "shows milliseconds when requested" do
|
11
15
|
expect(CaptionBlock.human_offset(132212, milliseconds: true)).to eq("2:12.212")
|
12
16
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moving_words
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alan Johnson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|