vidibus-helpers 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
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
@@ -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.2"
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-01}
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: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
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-01 00:00:00 +02:00
18
+ date: 2010-10-04 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency