vidibus-helpers 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.
- data/VERSION +1 -1
- data/lib/vidibus/helpers/extensions/view.rb +1 -1
- data/spec/vidibus/helpers/action_view_spec.rb +4 -0
- data/vidibus-helpers.gemspec +2 -2
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
@@ -28,7 +28,7 @@ module Vidibus
|
|
28
28
|
#
|
29
29
|
def number_to_duration(seconds, options = {})
|
30
30
|
hours = options[:hours]
|
31
|
-
seconds = seconds.round
|
31
|
+
seconds = seconds.to_f.round
|
32
32
|
hour = (seconds / 3600).floor unless hours == false
|
33
33
|
min = (seconds / 60).floor
|
34
34
|
sec = (seconds % 60).round
|
@@ -22,5 +22,9 @@ describe ActionView::Base do
|
|
22
22
|
it "should return 60:54 for 3654 seconds if :hours option is false" do
|
23
23
|
subject.number_to_duration(3654, :hours => false).should eql("60:54")
|
24
24
|
end
|
25
|
+
|
26
|
+
it "should accept string input" do
|
27
|
+
subject.number_to_duration("0.7").should eql("00:01")
|
28
|
+
end
|
25
29
|
end
|
26
30
|
end
|
data/vidibus-helpers.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{vidibus-helpers}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Andre Pankratz"]
|
12
|
-
s.date = %q{2010-10-
|
12
|
+
s.date = %q{2010-10-04}
|
13
13
|
s.description = %q{A collections of application helpers.}
|
14
14
|
s.email = %q{andre@vidibus.com}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vidibus-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andre Pankratz
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-10-
|
18
|
+
date: 2010-10-04 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|