inform 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/inform.gemspec +1 -1
- data/lib/inform.rb +4 -1
- data/lib/inform/version.rb +1 -1
- metadata +6 -6
data/inform.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.version = Inform::VERSION
|
8
8
|
s.authors = ["Michael Pearson", "Chris Ottrey"]
|
9
9
|
s.email = ["mipearson@gmail.com", ""]
|
10
|
-
s.homepage = "https://github.com/
|
10
|
+
s.homepage = "https://github.com/mipearson/inform"
|
11
11
|
s.summary = %q{Interactive, colourised logging}
|
12
12
|
s.description = s.summary
|
13
13
|
|
data/lib/inform.rb
CHANGED
@@ -36,9 +36,12 @@ class Inform
|
|
36
36
|
|
37
37
|
def info(message, args=nil)
|
38
38
|
if block_given?
|
39
|
+
start = Time.now
|
39
40
|
log(:info, ">>> " + color_args(message, args, GREEN) + " : ", :no_newline => true)
|
40
41
|
ret = yield
|
41
|
-
|
42
|
+
elapsed = Time.now - start
|
43
|
+
message = elapsed > 0.01 ? "Done. (#{sprintf '%.2f', elapsed}s)" : 'Done.'
|
44
|
+
log(:info, color(message, GREEN), :continue_line => true, :prefix => '>>> ')
|
42
45
|
ret
|
43
46
|
else
|
44
47
|
log(:info, "*** " + color_args(message, args, GREEN))
|
data/lib/inform/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inform
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Michael Pearson
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date:
|
19
|
+
date: 2012-08-28 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: rspec
|
@@ -83,7 +83,7 @@ files:
|
|
83
83
|
- lib/inform/version.rb
|
84
84
|
- spec/inform_spec.rb
|
85
85
|
- spec/spec_helper.rb
|
86
|
-
homepage: https://github.com/
|
86
|
+
homepage: https://github.com/mipearson/inform
|
87
87
|
licenses: []
|
88
88
|
|
89
89
|
post_install_message:
|
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
112
|
requirements: []
|
113
113
|
|
114
114
|
rubyforge_project:
|
115
|
-
rubygems_version: 1.
|
115
|
+
rubygems_version: 1.8.17
|
116
116
|
signing_key:
|
117
117
|
specification_version: 3
|
118
118
|
summary: Interactive, colourised logging
|