lll 1.11.0 → 1.12.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,8 @@
1
- = lll
1
+ ## lll ##
2
2
 
3
3
  lll() is used in debugging to display an expression and its value.
4
4
 
5
- === Motivation
5
+ ### Motivation ###
6
6
 
7
7
  One of the most basic tools in debugging is printing out the values of
8
8
  variables (or other expressions) during program execution:
@@ -22,7 +22,7 @@ The expression is passed as a string inside a block. It's useful to
22
22
  create a text editor macro that outputs <tt>lll{''}</tt> and leaves the
23
23
  cursor inside the apostrophes.
24
24
 
25
- === Other benefits
25
+ ### Other benefits ###
26
26
 
27
27
  Output goes to standard output and the Rails log (if available).
28
28
 
@@ -37,7 +37,7 @@ you can easily find lll's that you forgot to take out. The time of
37
37
  day (but not the date) is also printed, so you don't waste time
38
38
  looking at old output.
39
39
 
40
- === Outputting additional text
40
+ ### Outputting additional text ###
41
41
 
42
42
  Sometimes you want to include some other string, along with the label
43
43
  and value like this:
@@ -52,7 +52,3 @@ And because lll() outputs in reverse video, and to the Rails log, it can
52
52
  be useful to simply print a string without an expression:
53
53
 
54
54
  lll "After read_user"
55
-
56
- === Copyright
57
-
58
- Copyright (c) 2011 Mark Wilden. See LICENSE for details.
data/Rakefile CHANGED
@@ -9,7 +9,7 @@ begin
9
9
  gem.email = "mark@mwilden.com"
10
10
  gem.homepage = "http://github.com/mwilden/lll"
11
11
  gem.authors = ["Mark Wilden"]
12
- gem.description = File.read(File.join(File.dirname(__FILE__),'README.rdoc'))
12
+ gem.description = File.read(File.join(File.dirname(__FILE__),'README.md'))
13
13
  end
14
14
  Jeweler::GemcutterTasks.new
15
15
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.11.0
1
+ 1.12.0
data/lib/lll.rb CHANGED
@@ -18,7 +18,9 @@ module Lll
18
18
  expression_string = block.call
19
19
  expression_value = eval(expression_string, block.binding)
20
20
  output_string << expression_string + ' = '
21
- if enumerable? expression_value
21
+ if defined?(AwesomePrint)
22
+ output_string << expression_value.awesome_inspect << " \n"
23
+ elsif enumerable? expression_value
22
24
  output_string << " \n"
23
25
  expression_value.each { |e| output_string << ' ' << e.inspect << " \n" }
24
26
  else
data/lll.gemspec CHANGED
@@ -5,16 +5,16 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{lll}
8
- s.version = "1.11.0"
8
+ s.version = "1.12.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{Mark Wilden}]
12
- s.date = %q{2011-08-26}
13
- s.description = %q{= lll
12
+ s.date = %q{2011-09-10}
13
+ s.description = %q{## lll ##
14
14
 
15
15
  lll() is used in debugging to display an expression and its value.
16
16
 
17
- === Motivation
17
+ ### Motivation ###
18
18
 
19
19
  One of the most basic tools in debugging is printing out the values of
20
20
  variables (or other expressions) during program execution:
@@ -34,7 +34,7 @@ The expression is passed as a string inside a block. It's useful to
34
34
  create a text editor macro that outputs <tt>lll{''}</tt> and leaves the
35
35
  cursor inside the apostrophes.
36
36
 
37
- === Other benefits
37
+ ### Other benefits ###
38
38
 
39
39
  Output goes to standard output and the Rails log (if available).
40
40
 
@@ -49,7 +49,7 @@ you can easily find lll's that you forgot to take out. The time of
49
49
  day (but not the date) is also printed, so you don't waste time
50
50
  looking at old output.
51
51
 
52
- === Outputting additional text
52
+ ### Outputting additional text ###
53
53
 
54
54
  Sometimes you want to include some other string, along with the label
55
55
  and value like this:
@@ -64,25 +64,18 @@ And because lll() outputs in reverse video, and to the Rails log, it can
64
64
  be useful to simply print a string without an expression:
65
65
 
66
66
  lll "After read_user"
67
-
68
- === Copyright
69
-
70
- Copyright (c) 2011 Mark Wilden. See LICENSE for details.
71
67
  }
72
68
  s.email = %q{mark@mwilden.com}
73
69
  s.extra_rdoc_files = [
74
- "LICENSE",
75
- "README.rdoc"
70
+ "README.md"
76
71
  ]
77
72
  s.files = [
78
73
  ".document",
79
74
  "Gemfile",
80
75
  "Gemfile.lock",
81
- "LICENSE",
82
- "README.rdoc",
76
+ "README.md",
83
77
  "Rakefile",
84
78
  "VERSION",
85
- "doc/README_rdoc.html",
86
79
  "lib/lll.rb",
87
80
  "lll.gemspec",
88
81
  "test/test.rb"
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.11.0
4
+ version: 1.12.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-08-26 00:00:00.000000000Z
12
+ date: 2011-09-10 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: &2153189720 !ruby/object:Gem::Requirement
16
+ requirement: &2158844780 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *2153189720
24
+ version_requirements: *2158844780
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: jeweler
27
- requirement: &2153189240 !ruby/object:Gem::Requirement
27
+ requirement: &2158844300 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,43 +32,39 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *2153189240
36
- description: ! "= lll\n\nlll() is used in debugging to display an expression and its
37
- value.\n\n=== Motivation\n\nOne of the most basic tools in debugging is printing
38
- out the values of\nvariables (or other expressions) during program execution:\n\n
35
+ version_requirements: *2158844300
36
+ description: ! "## lll ##\n\nlll() is used in debugging to display an expression and
37
+ its value.\n\n### Motivation ###\n\nOne of the most basic tools in debugging is
38
+ printing out the values of\nvariables (or other expressions) during program execution:\n\n
39
39
  \ puts user_name\n\nSometimes you need to label these values so you know what
40
40
  they're\nreferring to, especially if you're outputting a lot of them:\n\n puts
41
41
  \"user_name = #{message}\"\n\nlll() does the labelling automatically: \n\n lll{'user_name'}\n\nThe
42
42
  expression is passed as a string inside a block. It's useful to\ncreate a text editor
43
- macro that outputs <tt>lll{''}</tt> and leaves the\ncursor inside the apostrophes.\n\n===
44
- Other benefits\n\nOutput goes to standard output and the Rails log (if available).\n\nOutput
43
+ macro that outputs <tt>lll{''}</tt> and leaves the\ncursor inside the apostrophes.\n\n###
44
+ Other benefits ###\n\nOutput goes to standard output and the Rails log (if available).\n\nOutput
45
45
  is displayed in reverse video, so it's easy to pick out from the\nlog or console.\n\nlll()
46
46
  uses #inspect to output the expression. It outputs Enumerable\nmembers (except strings)
47
47
  on separate lines.\n\nOutput is tagged with the file and line number where it appears,
48
48
  so\nyou can easily find lll's that you forgot to take out. The time of\nday (but
49
- not the date) is also printed, so you don't waste time\nlooking at old output.\n\n===
50
- Outputting additional text\n\nSometimes you want to include some other string, along
51
- with the label\nand value like this:\n\n puts \"After polling the queue, user_name
52
- = #{user_name}\"\n\nYou can pass a string to lll() to print a string:\n\n lll(\"After
53
- polling the queue\"){'user_name'}\n\nAnd because lll() outputs in reverse video,
54
- and to the Rails log, it can\nbe useful to simply print a string without an expression:\n\n
55
- \ lll \"After read_user\"\n\n=== Copyright\n\nCopyright (c) 2011 Mark Wilden.
56
- See LICENSE for details.\n"
49
+ not the date) is also printed, so you don't waste time\nlooking at old output.\n\n###
50
+ Outputting additional text ###\n\nSometimes you want to include some other string,
51
+ along with the label\nand value like this:\n\n puts \"After polling the queue,
52
+ user_name = #{user_name}\"\n\nYou can pass a string to lll() to print a string:\n\n
53
+ \ lll(\"After polling the queue\"){'user_name'}\n\nAnd because lll() outputs in
54
+ reverse video, and to the Rails log, it can\nbe useful to simply print a string
55
+ without an expression:\n\n lll \"After read_user\"\n"
57
56
  email: mark@mwilden.com
58
57
  executables: []
59
58
  extensions: []
60
59
  extra_rdoc_files:
61
- - LICENSE
62
- - README.rdoc
60
+ - README.md
63
61
  files:
64
62
  - .document
65
63
  - Gemfile
66
64
  - Gemfile.lock
67
- - LICENSE
68
- - README.rdoc
65
+ - README.md
69
66
  - Rakefile
70
67
  - VERSION
71
- - doc/README_rdoc.html
72
68
  - lib/lll.rb
73
69
  - lll.gemspec
74
70
  - test/test.rb
@@ -86,7 +82,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
86
82
  version: '0'
87
83
  segments:
88
84
  - 0
89
- hash: -1903205827779857824
85
+ hash: 3951909860434093297
90
86
  required_rubygems_version: !ruby/object:Gem::Requirement
91
87
  none: false
92
88
  requirements:
data/LICENSE DELETED
@@ -1,20 +0,0 @@
1
- Copyright (c) 2011 Mark Wilden
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/doc/README_rdoc.html DELETED
@@ -1,139 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
-
5
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
- <head>
7
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
8
-
9
- <title>File: README.rdoc [RDoc Documentation]</title>
10
-
11
- <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet" />
12
-
13
- <script src="./js/jquery.js" type="text/javascript"
14
- charset="utf-8"></script>
15
- <script src="./js/thickbox-compressed.js" type="text/javascript"
16
- charset="utf-8"></script>
17
- <script src="./js/quicksearch.js" type="text/javascript"
18
- charset="utf-8"></script>
19
- <script src="./js/darkfish.js" type="text/javascript"
20
- charset="utf-8"></script>
21
- </head>
22
-
23
- <body class="file">
24
- <div id="metadata">
25
- <div id="project-metadata">
26
-
27
-
28
- <div id="fileindex-section" class="section project-section">
29
- <h3 class="section-header">Files</h3>
30
- <ul>
31
-
32
- <li class="file"><a href="./README_rdoc.html">README.rdoc</a></li>
33
-
34
- </ul>
35
- </div>
36
-
37
-
38
- <div id="classindex-section" class="section project-section">
39
- <h3 class="section-header">Class Index
40
- <span class="search-toggle"><img src="./images/find.png"
41
- height="16" width="16" alt="[+]"
42
- title="show/hide quicksearch" /></span></h3>
43
- <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
44
- <fieldset>
45
- <legend>Quicksearch</legend>
46
- <input type="text" name="quicksearch" value=""
47
- class="quicksearch-field" />
48
- </fieldset>
49
- </form>
50
-
51
- <ul class="link-list">
52
-
53
- </ul>
54
- <div id="no-class-search-results" style="display: none;">No matching classes.</div>
55
- </div>
56
-
57
-
58
- </div>
59
- </div>
60
-
61
- <div id="documentation">
62
- <h1>lll</h1>
63
- <p>
64
- lll() is used in debugging to display an expression and its value.
65
- </p>
66
- <h3>Motivation</h3>
67
- <p>
68
- One of the most basic tools in debugging is printing out the values of
69
- variables (or other expressions) during program execution:
70
- </p>
71
- <pre>
72
- puts user_name
73
- </pre>
74
- <p>
75
- Sometimes you need to label these values so you know what they&#8217;re
76
- referring to, especially if you&#8217;re outputting a lot of them:
77
- </p>
78
- <pre>
79
- puts &quot;user_name = #{message}&quot;
80
- </pre>
81
- <p>
82
- lll() does the labelling automatically:
83
- </p>
84
- <pre>
85
- lll{'user_name'}
86
- </pre>
87
- <p>
88
- The expression is passed as a string inside a block. It&#8217;s useful to
89
- create a text editor macro that outputs <tt>lll{''}</tt> and leaves the
90
- cursor inside the apostrophes.
91
- </p>
92
- <h3>Other benefits</h3>
93
- <p>
94
- Output goes to standard output and the Rails log (if available).
95
- </p>
96
- <p>
97
- Output is displayed in reverse video, so it&#8217;s easy to pick out from
98
- the log or console.
99
- </p>
100
- <p>
101
- lll() uses inspect to output the expression. It outputs Enumerable members
102
- (except strings) on separate lines.
103
- </p>
104
- <h3>Outputting additional text</h3>
105
- <p>
106
- Sometimes you need to include some other string, along with the label and
107
- value:
108
- </p>
109
- <pre>
110
- puts &quot;After polling the queue, user_name = #{user_name}&quot;
111
- </pre>
112
- <p>
113
- You can pass a string to lll() to print a string:
114
- </p>
115
- <pre>
116
- lll(&quot;After polling the queue&quot;){'user_name'}
117
- </pre>
118
- <p>
119
- And because lll() outputs in reverse video, and to the Rails log, it can be
120
- useful to simply print a string without an expression:
121
- </p>
122
- <pre>
123
- lll &quot;After read_user&quot;
124
- </pre>
125
- <h3>Copyright</h3>
126
- <p>
127
- Copyright &#169; 2009 Mark Wilden. See LICENSE for details.
128
- </p>
129
-
130
- </div>
131
-
132
- <div id="validator-badges">
133
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
134
- <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
135
- Rdoc Generator</a> 1.1.6</small>.</p>
136
- </div>
137
- </body>
138
- </html>
139
-