diff -Nru lua-json-1.3/debian/changelog lua-json-1.3.1/debian/changelog --- lua-json-1.3/debian/changelog 2015-06-03 04:47:49.000000000 +0000 +++ lua-json-1.3.1/debian/changelog 2015-06-09 15:47:27.000000000 +0000 @@ -1,10 +1,23 @@ -lua-json (1.3-1ubuntu0.1) trusty; urgency=medium +lua-json (1.3.1-1ubuntu0.1~ubuntu14.04.1) trusty; urgency=medium + + * No-change backport to trusty + + -- Micah Gersten Tue, 09 Jun 2015 10:46:02 -0500 + +lua-json (1.3.1-1ubuntu0.1) utopic; urgency=medium * Add upstream patch to fix lpeg 0.12 compatibility (LP: #1443288) - add debian/patches/fix-lpeg.patch - add debian/patches/series - -- Micah Gersten Tue, 02 Jun 2015 23:41:59 -0500 + -- Micah Gersten Tue, 02 Jun 2015 23:50:53 -0500 + +lua-json (1.3.1-1) unstable; urgency=medium + + * [3d18e710] Merge tag 'upstream/1.3.1' + Upstream version 1.3.1 + + -- Bernd Zeimetz Thu, 13 Feb 2014 23:46:50 +0100 lua-json (1.3-1) unstable; urgency=low diff -Nru lua-json-1.3/debian/patches/fix-lpeg.patch lua-json-1.3.1/debian/patches/fix-lpeg.patch --- lua-json-1.3/debian/patches/fix-lpeg.patch 2015-06-03 04:41:17.000000000 +0000 +++ lua-json-1.3.1/debian/patches/fix-lpeg.patch 2015-06-03 04:51:58.000000000 +0000 @@ -10,11 +10,11 @@ lua/json/decode/util.lua | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) -Index: lua-json-1.3/lua/json/decode/strings.lua +Index: lua-json-1.3.1/lua/json/decode/strings.lua =================================================================== ---- lua-json-1.3.orig/lua/json/decode/strings.lua -+++ lua-json-1.3/lua/json/decode/strings.lua -@@ -23,11 +23,11 @@ +--- lua-json-1.3.1.orig/lua/json/decode/strings.lua 2015-06-02 23:51:51.502806248 -0500 ++++ lua-json-1.3.1/lua/json/decode/strings.lua 2015-06-02 23:51:51.498806249 -0500 +@@ -18,11 +18,11 @@ local function get_error(item) local fmt_string = item .. " in string [%q] @ %i:%i" @@ -28,7 +28,7 @@ end local bad_unicode = get_error("Illegal unicode escape") -@@ -72,8 +72,8 @@ +@@ -67,8 +67,8 @@ end local doSimpleSub = lpeg.C(lpeg.S("'\"\\/bfnrtvz")) / knownReplacements @@ -39,7 +39,7 @@ local defaultOptions = { badChars = '', -@@ -98,8 +98,8 @@ +@@ -93,8 +93,8 @@ local function buildCaptureString(quote, badChars, escapeMatch) local captureChar = (1 - lpeg.S("\\" .. badChars .. quote)) + (lpeg.P("\\") / "" * escapeMatch) @@ -50,7 +50,7 @@ return lpeg.P(quote) * lpeg.Cs(captureString) * lpeg.P(quote) end -@@ -116,7 +116,7 @@ +@@ -111,7 +111,7 @@ escapeMatch = escapeMatch + options.additionalEscapes end if options.escapeCheck then @@ -59,11 +59,11 @@ end local captureString for i = 1, #quotes do -Index: lua-json-1.3/lua/json/decode/util.lua +Index: lua-json-1.3.1/lua/json/decode/util.lua =================================================================== ---- lua-json-1.3.orig/lua/json/decode/util.lua -+++ lua-json-1.3/lua/json/decode/util.lua -@@ -38,7 +38,7 @@ +--- lua-json-1.3.1.orig/lua/json/decode/util.lua 2015-06-02 23:51:51.502806248 -0500 ++++ lua-json-1.3.1/lua/json/decode/util.lua 2015-06-02 23:51:51.498806249 -0500 +@@ -33,7 +33,7 @@ local line, line_index, bad_char, last_line = get_invalid_character_info(data, pos) local text = fmt:format(pos, line, line_index, bad_char, last_line) error(text) diff -Nru lua-json-1.3/docs/LuaJSON.txt lua-json-1.3.1/docs/LuaJSON.txt --- lua-json-1.3/docs/LuaJSON.txt 2011-12-30 01:16:19.000000000 +0000 +++ lua-json-1.3.1/docs/LuaJSON.txt 2012-10-06 01:55:18.000000000 +0000 @@ -10,7 +10,7 @@ SYNOPSIS -------- -require("json") +local json = require("json") json.decode("json-string" [, parameters]) diff -Nru lua-json-1.3/docs/ReleaseNotes-1.3.1.txt lua-json-1.3.1/docs/ReleaseNotes-1.3.1.txt --- lua-json-1.3/docs/ReleaseNotes-1.3.1.txt 1970-01-01 00:00:00.000000000 +0000 +++ lua-json-1.3.1/docs/ReleaseNotes-1.3.1.txt 2012-10-06 01:55:18.000000000 +0000 @@ -0,0 +1,40 @@ +luajson v1.3.1 Release Notes +============================ + +User Visible Changes +-------------------- +This release does not introduce many changes. +François Perrad kindly produced patches to make it work better with Lua 5.2 +and handle strict modes. +It also introduces additional documentation about what varieties of Lua +have been tested. + +Plans for next release +---------------------- +A future release will have a stronger focus on decoder performance. It may +mean a reduction in flexibility by removing options and breaking compatibility. + + +Updates since 1.3 +================= + +François Perrad (7): + -ungrouped- + fix with Lua 5.2 strict + remove the condition around `_ENV = nil` + remove conditional (is_52) code + fix tests + fix test with Lua 5.2.0 + lfs : + fix with Lua 5.2 strict +Thomas Harning Jr (7): + -ungrouped- + Merge pull request #21 from fperrad/compat51_52 + Merge pull request #22 from fperrad/patch-1 + Merge pull request #23 from fperrad/patch-2 + all: + adds module metadata as suggested by fperrad + decoder: + fixes 5.2-strict mode state object + docs: + notes tested Lua versions diff -Nru lua-json-1.3/lua/json/decode/composite.lua lua-json-1.3.1/lua/json/decode/composite.lua --- lua-json-1.3/lua/json/decode/composite.lua 2011-12-30 01:16:19.000000000 +0000 +++ lua-json-1.3.1/lua/json/decode/composite.lua 2012-10-06 01:55:18.000000000 +0000 @@ -18,12 +18,7 @@ local error = error local getmetatable = getmetatable -local is_52 = _VERSION == "Lua 5.2" -local _G = _G - -if is_52 then - _ENV = nil -end +_ENV = nil local defaultOptions = { array = { @@ -192,9 +187,4 @@ generateLexer = generateLexer } -if not is_52 then - _G.json = _G.json or {} - _G.json.decode = _G.json.decode or {} - _G.json.decode.composite = composite -end return composite diff -Nru lua-json-1.3/lua/json/decode/number.lua lua-json-1.3.1/lua/json/decode/number.lua --- lua-json-1.3/lua/json/decode/number.lua 2011-12-30 01:16:19.000000000 +0000 +++ lua-json-1.3.1/lua/json/decode/number.lua 2012-10-06 01:55:18.000000000 +0000 @@ -8,12 +8,7 @@ local merge = jsonutil.merge local util = require("json.decode.util") -local is_52 = _VERSION == "Lua 5.2" -local _G = _G - -if is_52 then - _ENV = nil -end +_ENV = nil local digit = lpeg.R("09") local digits = digit^1 @@ -102,9 +97,4 @@ generateLexer = generateLexer } -if not is_52 then - _G.json = _G.json or {} - _G.json.decode = _G.json.decode or {} - _G.json.decode.number = number -end return number diff -Nru lua-json-1.3/lua/json/decode/others.lua lua-json-1.3.1/lua/json/decode/others.lua --- lua-json-1.3/lua/json/decode/others.lua 2011-12-30 01:16:19.000000000 +0000 +++ lua-json-1.3.1/lua/json/decode/others.lua 2012-10-06 01:55:18.000000000 +0000 @@ -8,12 +8,8 @@ local util = require("json.decode.util") -- Container module for other JavaScript types (bool, null, undefined) -local is_52 = _VERSION == "Lua 5.2" -local _G = _G -if is_52 then - _ENV = nil -end +_ENV = nil -- For null and undefined, use the util.null value to preserve null-ness local booleanCapture = @@ -63,10 +59,4 @@ generateLexer = generateLexer } -if not is_52 then - _G.json = _G.json or{} - _G.json.decode = _G.json.decode or {} - _G.json.decode.others = others -end - return others diff -Nru lua-json-1.3/lua/json/decode/state.lua lua-json-1.3.1/lua/json/decode/state.lua --- lua-json-1.3/lua/json/decode/state.lua 2011-12-30 01:16:19.000000000 +0000 +++ lua-json-1.3.1/lua/json/decode/state.lua 2012-10-06 01:55:18.000000000 +0000 @@ -10,7 +10,7 @@ local next = next local unpack = unpack -module("json.decode.state") +_ENV = nil local state_ops = {} local state_mt = { @@ -166,7 +166,7 @@ end -function create(options) +local function create(options) local ret = { options = options, stack = {}, @@ -181,3 +181,9 @@ } return setmetatable(ret, state_mt) end + +local state = { + create = create +} + +return state diff -Nru lua-json-1.3/lua/json/decode/strings.lua lua-json-1.3.1/lua/json/decode/strings.lua --- lua-json-1.3/lua/json/decode/strings.lua 2011-12-30 01:16:19.000000000 +0000 +++ lua-json-1.3.1/lua/json/decode/strings.lua 2012-10-06 01:55:18.000000000 +0000 @@ -14,12 +14,7 @@ local error = error -local is_52 = _VERSION == "Lua 5.2" -local _G = _G - -if is_52 then - _ENV = nil -end +_ENV = nil local function get_error(item) local fmt_string = item .. " in string [%q] @ %i:%i" @@ -135,10 +130,4 @@ generateLexer = generateLexer } -if not is_52 then - _G.json = _G.json or {} - _G.json.decode = _G.json.decode or {} - _G.json.decode.strings = strings -end - return strings diff -Nru lua-json-1.3/lua/json/decode/util.lua lua-json-1.3.1/lua/json/decode/util.lua --- lua-json-1.3/lua/json/decode/util.lua 2011-12-30 01:16:19.000000000 +0000 +++ lua-json-1.3.1/lua/json/decode/util.lua 2012-10-06 01:55:18.000000000 +0000 @@ -17,12 +17,7 @@ local merge = require("json.util").merge -local is_52 = _VERSION == "Lua 5.2" -local _G = _G - -if is_52 then - _ENV = nil -end +_ENV = nil local function get_invalid_character_info(input, index) local parsed = input:sub(1, index) @@ -134,10 +129,4 @@ setObjectKeyForceNumber = setObjectKeyForceNumber } -if not is_52 then - _G.json = _G.json or {} - _G.json.decode = _G.json.decode or {} - _G.json.decode.util = util -end - return util diff -Nru lua-json-1.3/lua/json/decode.lua lua-json-1.3.1/lua/json/decode.lua --- lua-json-1.3/lua/json/decode.lua 2011-12-30 01:16:19.000000000 +0000 +++ lua-json-1.3.1/lua/json/decode.lua 2012-10-06 01:55:18.000000000 +0000 @@ -22,12 +22,7 @@ local require = require -local is_52 = _VERSION == "Lua 5.2" -local _G = _G - -if is_52 then - _ENV = nil -end +_ENV = nil local modulesToLoad = { "composite", @@ -170,10 +165,7 @@ json_decode.getDecoder = getDecoder json_decode.decode = decode +json_decode.util = util setmetatable(json_decode, mt) -if not is_52 then - _G.json= _G.json or {} - _G.json.decode = merge(json_decode, _G.json.decode) -end return json_decode diff -Nru lua-json-1.3/lua/json/encode/array.lua lua-json-1.3.1/lua/json/encode/array.lua --- lua-json-1.3/lua/json/encode/array.lua 2011-12-30 01:16:19.000000000 +0000 +++ lua-json-1.3.1/lua/json/encode/array.lua 2012-10-06 01:55:18.000000000 +0000 @@ -16,12 +16,7 @@ local jsonutil = require("json.util") local util_IsArray = jsonutil.IsArray -local is_52 = _VERSION == "Lua 5.2" -local _G = _G - -if is_52 then - _ENV = nil -end +_ENV = nil local defaultOptions = { isArray = util_IsArray @@ -112,9 +107,4 @@ getEncoder = getEncoder } -if not is_52 then - _G.json = _G.json or {} - _G.json.encode = _G.json.encode or {} - _G.json.encode.array = array -end return array diff -Nru lua-json-1.3/lua/json/encode/calls.lua lua-json-1.3.1/lua/json/encode/calls.lua --- lua-json-1.3/lua/json/encode/calls.lua 2011-12-30 01:16:19.000000000 +0000 +++ lua-json-1.3.1/lua/json/encode/calls.lua 2012-10-06 01:55:18.000000000 +0000 @@ -13,12 +13,7 @@ local isCall, decodeCall = jsonutil.isCall, jsonutil.decodeCall -local is_52 = _VERSION == "Lua 5.2" -local _G = _G - -if is_52 then - _ENV = nil -end +_ENV = nil local defaultOptions = { } @@ -70,9 +65,4 @@ getEncoder = getEncoder } -if not is_52 then - _G.json = _G.json or {} - _G.json.encode = _G.json.encode or {} - _G.json.encode.calls = calls -end return calls diff -Nru lua-json-1.3/lua/json/encode/number.lua lua-json-1.3.1/lua/json/encode/number.lua --- lua-json-1.3/lua/json/encode/number.lua 2011-12-30 01:16:19.000000000 +0000 +++ lua-json-1.3.1/lua/json/encode/number.lua 2012-10-06 01:55:18.000000000 +0000 @@ -7,12 +7,7 @@ local jsonutil = require("json.util") local huge = require("math").huge -local is_52 = _VERSION == "Lua 5.2" -local _G = _G - -if is_52 then - _ENV = nil -end +_ENV = nil local defaultOptions = { nan = true, @@ -60,10 +55,4 @@ getEncoder = getEncoder } -if not is_52 then - _G.json = _G.json or {} - _G.json.encode = _G.json.encode or {} - _G.json.encode.number = number -end - return number diff -Nru lua-json-1.3/lua/json/encode/object.lua lua-json-1.3.1/lua/json/encode/object.lua --- lua-json-1.3/lua/json/encode/object.lua 2011-12-30 01:16:19.000000000 +0000 +++ lua-json-1.3.1/lua/json/encode/object.lua 2012-10-06 01:55:18.000000000 +0000 @@ -11,12 +11,7 @@ local table_concat = require("table").concat local jsonutil = require("json.util") -local is_52 = _VERSION == "Lua 5.2" -local _G = _G - -if is_52 then - _ENV = nil -end +_ENV = nil local defaultOptions = { } @@ -79,10 +74,4 @@ getEncoder = getEncoder } -if not is_52 then - _G.json = _G.json or {} - _G.json.encode = _G.json.encode or {} - _G.json.encode.object = object -end - return object diff -Nru lua-json-1.3/lua/json/encode/others.lua lua-json-1.3.1/lua/json/encode/others.lua --- lua-json-1.3/lua/json/encode/others.lua 2011-12-30 01:16:19.000000000 +0000 +++ lua-json-1.3.1/lua/json/encode/others.lua 2012-10-06 01:55:18.000000000 +0000 @@ -8,12 +8,7 @@ local jsonutil = require("json.util") local type = type -local is_52 = _VERSION == "Lua 5.2" -local _G = _G - -if is_52 then - _ENV = nil -end +_ENV = nil -- Shortcut that works local encodeBoolean = tostring @@ -68,10 +63,4 @@ getEncoder = getEncoder } -if not is_52 then - _G.json = _G.json or {} - _G.json.encode = _G.json.encode or {} - _G.json.encode.others = others -end - return others diff -Nru lua-json-1.3/lua/json/encode/output.lua lua-json-1.3.1/lua/json/encode/output.lua --- lua-json-1.3/lua/json/encode/output.lua 2011-12-30 01:16:19.000000000 +0000 +++ lua-json-1.3.1/lua/json/encode/output.lua 2012-10-06 01:55:18.000000000 +0000 @@ -13,12 +13,7 @@ local output_utility = require("json.encode.output_utility") -local is_52 = _VERSION == "Lua 5.2" -local _G = _G - -if is_52 then - _ENV = nil -end +_ENV = nil local tableCompositeCache = setmetatable({}, {__mode = 'v'}) @@ -93,10 +88,4 @@ getIoWriter = getIoWriter } -if not is_52 then - _G.json = _G.json or {} - _G.json.encode = _G.json.encode or {} - _G.json.encode.output = output -end - return output diff -Nru lua-json-1.3/lua/json/encode/output_utility.lua lua-json-1.3.1/lua/json/encode/output_utility.lua --- lua-json-1.3/lua/json/encode/output_utility.lua 2011-12-30 01:16:19.000000000 +0000 +++ lua-json-1.3.1/lua/json/encode/output_utility.lua 2012-10-06 01:55:18.000000000 +0000 @@ -5,12 +5,7 @@ local setmetatable = setmetatable local assert, loadstring = assert, loadstring or load -local is_52 = _VERSION == "Lua 5.2" -local _G = _G - -if is_52 then - _ENV = nil -end +_ENV = nil -- Key == weak, if main key goes away, then cache cleared local outputCache = setmetatable({}, {__mode = 'k'}) @@ -56,10 +51,4 @@ prepareEncoder = prepareEncoder } -if not is_52 then - _G.json = _G.json or {} - _G.json.encode = _G.json.encode or {} - _G.json.encode.output_utility = output_utility -end - return output_utility diff -Nru lua-json-1.3/lua/json/encode/strings.lua lua-json-1.3.1/lua/json/encode/strings.lua --- lua-json-1.3/lua/json/encode/strings.lua 2011-12-30 01:16:19.000000000 +0000 +++ lua-json-1.3.1/lua/json/encode/strings.lua 2012-10-06 01:55:18.000000000 +0000 @@ -8,12 +8,7 @@ local jsonutil = require("json.util") local util_merge = jsonutil.merge -local is_52 = _VERSION == "Lua 5.2" -local _G = _G - -if is_52 then - _ENV = nil -end +_ENV = nil local normalEncodingMap = { ['"'] = '\\"', @@ -90,10 +85,4 @@ getEncoder = getEncoder } -if not is_52 then - _G.json = _G.json or {} - _G.json.encode = _G.json.encode or {} - _G.json.encode.strings = strings -end - return strings diff -Nru lua-json-1.3/lua/json/encode.lua lua-json-1.3.1/lua/json/encode.lua --- lua-json-1.3/lua/json/encode.lua 2011-12-30 01:16:19.000000000 +0000 +++ lua-json-1.3.1/lua/json/encode.lua 2012-10-06 01:55:18.000000000 +0000 @@ -14,12 +14,7 @@ local util = require("json.util") local util_merge, isCall = util.merge, util.isCall -local is_52 = _VERSION == "Lua 5.2" -local _G = _G - -if is_52 then - _ENV = nil -end +_ENV = nil --[[ List of encoding modules to load. @@ -168,8 +163,4 @@ setmetatable(json_encode, mt) -if not is_52 then - _G.json = _G.json or {} - _G.json.encode = util_merge(json_encode, _G.json.encode) -end return json_encode diff -Nru lua-json-1.3/lua/json/util.lua lua-json-1.3.1/lua/json/util.lua --- lua-json-1.3/lua/json/util.lua 2011-12-30 01:16:19.000000000 +0000 +++ lua-json-1.3.1/lua/json/util.lua 2012-10-06 01:55:18.000000000 +0000 @@ -9,12 +9,7 @@ local getmetatable, setmetatable = getmetatable, setmetatable local select = select -local is_52 = _VERSION == "Lua 5.2" -local _G = _G - -if is_52 then - _ENV = nil -end +_ENV = nil local function foreach(tab, func) for k, v in pairs(tab) do @@ -145,9 +140,4 @@ doOptionMerge = doOptionMerge } -if not is_52 then - _G.json = _G.json or {} - _G.json.util = json_util -end - return json_util diff -Nru lua-json-1.3/lua/json.lua lua-json-1.3.1/lua/json.lua --- lua-json-1.3/lua/json.lua 2011-12-30 01:16:19.000000000 +0000 +++ lua-json-1.3.1/lua/json.lua 2012-10-06 01:55:18.000000000 +0000 @@ -6,21 +6,19 @@ local encode = require("json.encode") local util = require("json.util") -local is_52 = _VERSION == "Lua 5.2" - local _G = _G -if is_52 then - _ENV = nil -end +_ENV = nil local json = { + _VERSION = "1.3", + _DESCRIPTION = "LuaJSON : customizable JSON decoder/encoder", + _COPYRIGHT = "Copyright (c) 2007-2012 Thomas Harning Jr. ", decode = decode, encode = encode, util = util } -if not is_52 then - _G.json = json -end +_G.json = json + return json diff -Nru lua-json-1.3/README lua-json-1.3.1/README --- lua-json-1.3/README 2011-12-30 01:16:19.000000000 +0000 +++ lua-json-1.3.1/README 2012-10-06 01:55:18.000000000 +0000 @@ -11,13 +11,18 @@ harningt@gmail.com Requirements - Lua 5.1 - LPeg (Tested with 0.7, 0.8, 0.9 ... 0.6 mostly works) + Lua 5.1, 5.2, or LuaJIT 2.0 + LPeg (Tested with 0.7, 0.8, 0.9, 0.10 ... 0.6 mostly works) For regressionTest: lfs (Tested with 1.4.1) For lunit-tests: lunit >= 0.4 +Lua versions tested recently: + Lua 5.1.4 + strict + Lua 5.2.0 + LuaJIT-2.0.0-beta10 + strict + License All-but tests: MIT-style, See LICENSE for details tests/*: Public Domain / MIT - whichever is least restrictive diff -Nru lua-json-1.3/ReleaseNotes.txt lua-json-1.3.1/ReleaseNotes.txt --- lua-json-1.3/ReleaseNotes.txt 2011-12-30 01:16:19.000000000 +0000 +++ lua-json-1.3.1/ReleaseNotes.txt 2012-10-06 01:55:18.000000000 +0000 @@ -1,23 +1,13 @@ -luajson v1.3 Release Notes -========================== +luajson v1.3.1 Release Notes +============================ User Visible Changes -------------------- -A global 'nothrow' option was added to change the behavior of parsing -to not throw, but return `nil, error`. -Error messages were also enhanced for many cases to include better details as -to why the parsing may have failed. -Some examples follow: - -For `[1i]` - unexpected character @ character: 3 0:3 [i] line: - [1i -For `{x:1` - Unclosed elements present - -The parser was also unrolled so that LPeg was placed more into a lexer role -rather than full-blown parser. This solves the problem of LPeg running into -problems in my parser due to unclosed choices at a small performance cost. +This release does not introduce many changes. +François Perrad kindly produced patches to make it work better with Lua 5.2 +and handle strict modes. +It also introduces additional documentation about what varieties of Lua +have been tested. Plans for next release ---------------------- @@ -25,23 +15,26 @@ mean a reduction in flexibility by removing options and breaking compatibility. -Updates since 1.2.2 -=================== +Updates since 1.3 +================= -Thomas Harning Jr (9): +François Perrad (7): + -ungrouped- + fix with Lua 5.2 strict + remove the condition around `_ENV = nil` + remove conditional (is_52) code + fix tests + fix test with Lua 5.2.0 + lfs : + fix with Lua 5.2 strict +Thomas Harning Jr (7): + -ungrouped- + Merge pull request #21 from fperrad/compat51_52 + Merge pull request #22 from fperrad/patch-1 + Merge pull request #23 from fperrad/patch-2 all: - 5.2 compatibility - update option processing system to do more pre-configuration to better prepare for future changes - base: - rockspec scm-4 added due to file layout change - fixes luajson-scm-4.rockspec + adds module metadata as suggested by fperrad decoder: - adds global 'nothrow' option to protect call automatically - error detection enhancements from next branch - overhaul update to be iterative to avoid call-stack buildup w/ limits and horrible performance hit - tests: - adds null array roundtrip issue per gh-4 -Francois Perrad (2): - -ungrouped- - fix loadstring when Lua 5.2 is strict - fix test suite with Lua 5.2 + fixes 5.2-strict mode state object + docs: + notes tested Lua versions diff -Nru lua-json-1.3/rockspecs/luajson-1.3.1-1.rockspec lua-json-1.3.1/rockspecs/luajson-1.3.1-1.rockspec --- lua-json-1.3/rockspecs/luajson-1.3.1-1.rockspec 1970-01-01 00:00:00.000000000 +0000 +++ lua-json-1.3.1/rockspecs/luajson-1.3.1-1.rockspec 2012-10-06 01:55:18.000000000 +0000 @@ -0,0 +1,43 @@ +package = "luajson" +version = "1.3.1-1" +source = { +} +description = { + summary = "customizable JSON decoder/encoder", + detailed = [[ + LuaJSON is a customizable JSON decoder/encoder using + LPEG for parsing. + ]], + homepage = "http://github.com/harningt/luajson", + maintainer = "Thomas Harning ", + license = "MIT/X11" +} +dependencies = { + "lua >= 5.1", + "lunit >= 0.4", + "lpeg >= 0.8.1" +} +build = { + type = "module", + modules = { + ["json"] = "lua/json.lua", + ["json.decode"] = "lua/json/decode.lua", + ["json.decode.composite"] = "lua/json/decode/composite.lua", + ["json.decode.number"] = "lua/json/decode/number.lua", + ["json.decode.others"] = "lua/json/decode/others.lua", + ["json.decode.state"] = "lua/json/decode/state.lua", + ["json.decode.strings"] = "lua/json/decode/strings.lua", + ["json.decode.util"] = "lua/json/decode/util.lua", + ["json.encode"] = "lua/json/encode.lua", + ["json.encode.array"] = "lua/json/encode/array.lua", + ["json.encode.calls"] = "lua/json/encode/calls.lua", + ["json.encode.number"] = "lua/json/encode/number.lua", + ["json.encode.object"] = "lua/json/encode/object.lua", + ["json.encode.others"] = "lua/json/encode/others.lua", + ["json.encode.output"] = "lua/json/encode/output.lua", + ["json.encode.output_utility"] = "lua/json/encode/output_utility.lua", + ["json.encode.strings"] = "lua/json/encode/strings.lua", + ["json.util"] = "lua/json/util.lua" + } +} + diff -Nru lua-json-1.3/rockspecs/luajson-1.3-1.rockspec lua-json-1.3.1/rockspecs/luajson-1.3-1.rockspec --- lua-json-1.3/rockspecs/luajson-1.3-1.rockspec 2011-12-30 01:16:19.000000000 +0000 +++ lua-json-1.3.1/rockspecs/luajson-1.3-1.rockspec 2012-10-06 01:55:18.000000000 +0000 @@ -1,6 +1,8 @@ package = "luajson" version = "1.3-1" source = { + url = "http://cloud.github.com/downloads/harningt/luajson/luajson-1.3.tar.gz", + md5 = "18a59640119143ea69b3744b467e1a89" } description = { summary = "customizable JSON decoder/encoder", diff -Nru lua-json-1.3/tests/hook_require.lua lua-json-1.3.1/tests/hook_require.lua --- lua-json-1.3/tests/hook_require.lua 2011-12-30 01:16:19.000000000 +0000 +++ lua-json-1.3.1/tests/hook_require.lua 2012-10-06 01:55:18.000000000 +0000 @@ -1,6 +1,7 @@ local os = require("os") local old_require = require if os.getenv('LUA_OLD_INIT') then + local loadstring = loadstring or load assert(loadstring(os.getenv('LUA_OLD_INIT')))() else require("luarocks.require") diff -Nru lua-json-1.3/tests/lunit-calls.lua lua-json-1.3.1/tests/lunit-calls.lua --- lua-json-1.3/tests/lunit-calls.lua 2011-12-30 01:16:19.000000000 +0000 +++ lua-json-1.3.1/tests/lunit-calls.lua 2012-10-06 01:55:18.000000000 +0000 @@ -1,3 +1,4 @@ +local lpeg = require("lpeg") local json = require("json") local lunit = require("lunit") local math = require("math") diff -Nru lua-json-1.3/tests/regressionTest.lua lua-json-1.3.1/tests/regressionTest.lua --- lua-json-1.3/tests/regressionTest.lua 2011-12-30 01:16:19.000000000 +0000 +++ lua-json-1.3.1/tests/regressionTest.lua 2012-10-06 01:55:18.000000000 +0000 @@ -3,7 +3,7 @@ local io = require("io") local os = require("os") -require("lfs") +local lfs = require("lfs") local success = true