lll 1.0.0 → 1.0.1

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. data/VERSION +1 -1
  2. data/lib/lll.rb +5 -6
  3. data/test/test.rb +15 -0
  4. metadata +4 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.1
data/lib/lll.rb CHANGED
@@ -25,12 +25,11 @@ def lll msg = nil, &block
25
25
  s << " \n"
26
26
  end
27
27
 
28
- color_code_for_value = "\e[7m"
29
- color_code_for_location = ""
30
- stop_color_code = "\e[0m"
31
-
32
- s = color_code_for_value + s + stop_color_code
33
- s << color_code_for_location + ' ' + caller.first.to_s + ' ' + Time.now.strftime('%X') + ' ' + stop_color_code
28
+ reverse_video_color_code = "\e[7m"
29
+ reset_color_code = "\e[0m"
30
+
31
+ s = reverse_video_color_code + s + reset_color_code
32
+ s << caller.first.to_s + ' ' + Time.now.strftime('%X')
34
33
 
35
34
  Kernel.puts s
36
35
  Rails.logger.debug s if defined?(Rails) && Rails.logger
data/test/test.rb ADDED
@@ -0,0 +1,15 @@
1
+ require File.dirname(__FILE__) + '/../lib/lll'
2
+
3
+ puts "Message alone"
4
+ lll 'Message'
5
+
6
+ puts "\nExpression alone"
7
+ x = 1
8
+ lll{'x'}
9
+
10
+ puts "\nMessage and expression"
11
+ lll('Message'){'x'}
12
+
13
+ puts "\nArray"
14
+ x = [1,2]
15
+ lll{'x'}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lll
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Wilden
@@ -90,6 +90,7 @@ files:
90
90
  - VERSION
91
91
  - doc/README_rdoc.html
92
92
  - lib/lll.rb
93
+ - test/test.rb
93
94
  has_rdoc: true
94
95
  homepage: http://github.com/mwilden/lll
95
96
  licenses: []
@@ -118,5 +119,5 @@ rubygems_version: 1.3.5
118
119
  signing_key:
119
120
  specification_version: 3
120
121
  summary: Output labeled data when debugging
121
- test_files: []
122
-
122
+ test_files:
123
+ - test/test.rb