slides 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/slides.rb +5 -3
  2. metadata +2 -2
@@ -8,10 +8,10 @@ module Slides
8
8
  mtx.synchronize { $stdout.puts str }
9
9
  else
10
10
  start = Time.now
11
- log(event, attrs.merge(at: :start))
11
+ log(event, attrs.merge(:at => :start))
12
12
  res = yield
13
- log(event, attrs.merge(at: :finish,
14
- elapsed: "#{((Time.now - start) * 1000).to_i}ms"))
13
+ log(event, attrs.merge(:at => :finish,
14
+ :elapsed => (Time.now - start).to_f))
15
15
  res
16
16
  end
17
17
  end
@@ -42,6 +42,8 @@ module Slides
42
42
  # only quote strings if they include whitespace
43
43
  if v == nil
44
44
  nil
45
+ elsif v.is_a?(Float)
46
+ "#{k}=#{format("%.3f", v)}"
45
47
  elsif v.is_a?(String) && v =~ /\s/
46
48
  quote_string(k, v)
47
49
  elsif v.is_a?(Time)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slides
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-30 00:00:00.000000000 Z
12
+ date: 2012-10-17 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description:
15
15
  email: brandur@mutelight.org