From afb50da5981f2ea74835029e46561cc8db96efd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrique=20Garc=C3=ADa=20Cota?= Date: Thu, 21 Apr 2011 01:12:23 +0200 Subject: [PATCH] initial commit --- BSD-LICENSE.txt | 26 ++++++++++++++++++++++++++ README.textile | 36 ++++++++++++++++++++++++++++++++++++ inspect.lua | 0 3 files changed, 62 insertions(+) create mode 100644 BSD-LICENSE.txt create mode 100644 README.textile create mode 100644 inspect.lua diff --git a/BSD-LICENSE.txt b/BSD-LICENSE.txt new file mode 100644 index 0000000..f34a477 --- /dev/null +++ b/BSD-LICENSE.txt @@ -0,0 +1,26 @@ +Copyright (c) 2011, Enrique GarcĂ­a Cota +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + 3. Neither the name of MiddleClass nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/README.textile b/README.textile new file mode 100644 index 0000000..4883763 --- /dev/null +++ b/README.textile @@ -0,0 +1,36 @@ +h1. inspect.lua + +This function transform any Lua table into a human-readable representation of that table. + +The objective here is human understanding (i.e. for debugging), not serialization or compactness. + +h1. Examples of use + + +h1. Gotchas / Warnings + + +h1. Installation + +Just copy the inspect.lua file somewhere in your projects (maybe inside a /lib/ folder) and require it accordingly. + +Remember to store the value returned by require somewhere! (I suggest a local variable named inspect, altough others might like table.inspect) + +
+local inspect = require 'inspect'
+      -- or --
+table.inspect = require 'inspect'
+
+ +Also, make sure to read the license file; the text of that license file must appear somewhere in your projects' files. + +h1. Specs + +This project uses "telescope":https://github.com/norman/telescope for its specs. If you want to run the specs, you will have to install telescope first. Then just enter the spec folder and execute run.lua: + +
+cd path/to/inspect.lua/specs
+lua run.lua
+
+ + diff --git a/inspect.lua b/inspect.lua new file mode 100644 index 0000000..e69de29