inform 0.0.7 → 0.0.8

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.
Files changed (4) hide show
  1. checksums.yaml +8 -8
  2. data/lib/inform/version.rb +1 -1
  3. data/lib/inform.rb +12 -3
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZTRmYzY5YmIwZDNiY2EyYWExNjViNGE5ZjcxNDdkNjU3MjJmNTNiYg==
4
+ MDBiNWE5NGQ1ZDQyYzdlNDlkOGI1OTRhNjA1NmZmZTNjN2M4NGFiOA==
5
5
  data.tar.gz: !binary |-
6
- YTRiNGZmZWJiZTA3ZjU4OTM5MWYxODc2MmRjMjM4MDlkNDU1OTZhZQ==
6
+ N2U1Y2ZhNDhmNTUyYWE3NGZhYTBlMDI0MzJmZGNkMzZjZTVjOTcxYg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YTg3OGU3NzBhMDI0ODM5MDZmMGFjOWU1MmMzZTRlNjdjN2RlYjAzNWJlNjc1
10
- MGU5ZjVhMGM3YWQ0NTg2ZWEwZDY4ODA3NTlmNTAwYWNjNjE5MTQ0NzFjMTJj
11
- MTQ2NjczMWZiZGM3MzZkMDM5MWYzMGE5MjQ4OGVmMjdmZjRiODM=
9
+ ODkxN2EyOGJiNWI0NGJlYjRhODUxMGY3ZWE1ZGVhNWE2ZjZiMTExNDg0YmUx
10
+ MGZmYWQxMjcwZDkzMThmMmYwZmIwN2Q5MzJlNTFkYWZjZjBjNzFmNmI0NGMx
11
+ NWNmMWVhMGJhZTQ5OWExNWQwZDM1ZGI0YTk2ZGJmMDYwNDE5NGE=
12
12
  data.tar.gz: !binary |-
13
- MzZmZGE2ZDM4YmJiNTdiM2JjYTk1OTE1NTIwYWRhZGVmNTU1ZWMzZjE0NDRl
14
- YmExZWE2ZTQ3NjVlMjFhNDU3ZjdhZDY2OTVkYzc1MzZmNGZkMjczODUwNTU0
15
- NmE4YThmYjc1OGEwYjQxMDE1OTA3N2MwNWQ4OTFmYzFlMzc1NTY=
13
+ YmFlYTRmZjA3MDUzNmQ2MzkzZDFhODM2NDBiY2YyNWQzYTVkYjMxZGE2M2Jm
14
+ ZWY0Mzc2NTljZDk3YWI5ZjE5MmExZjY5Mzg1ZDQ0YzE2ZDVmZjc1YzQxMjNj
15
+ NWJmMDc3MzQ5ZjQ5NDJkOWY4Y2UwYzBjY2IyODA4NGI4NTZjOWY=
@@ -1,3 +1,3 @@
1
1
  class Inform
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
data/lib/inform.rb CHANGED
@@ -47,11 +47,20 @@ class Inform
47
47
  if block_given?
48
48
  start = Time.now
49
49
  smart_newlines = thread_prefix.nil?
50
- log(:info, ">>> " + color_args(message, args, GREEN) + " : ", :no_newline => smart_newlines)
50
+ if smart_newlines
51
+ log(:info, ">>> " + color_args(message, args, GREEN) + " : ", :no_newline => true)
52
+ else
53
+ log(:info, ">>> " + color_args(message, args, GREEN) + " ... ")
54
+ end
55
+
51
56
  ret = yield
52
57
  elapsed = Time.now - start
53
- message = elapsed > 0.01 ? "Done. (#{sprintf '%.2f', elapsed}s)" : 'Done.'
54
- log(:info, color(message, GREEN), :continue_line => smart_newlines, :prefix => '>>> ')
58
+ completion = elapsed > 0.01 ? "Done. (#{sprintf '%.2f', elapsed}s)" : 'Done.'
59
+ if smart_newlines
60
+ log(:info, color(completion, GREEN), :continue_line => true, :prefix => '>>> ')
61
+ else
62
+ log(:info, "*** " + color(message, GREEN) + ' : ' + color(completion, GREEN))
63
+ end
55
64
  ret
56
65
  else
57
66
  log(:info, "*** " + color_args(message, args, GREEN))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inform
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Pearson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-04 00:00:00.000000000 Z
12
+ date: 2013-05-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  requirement: !ruby/object:Gem::Requirement