rufus-lua-moon 0.2.3 → 0.2.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rufus/lua/moon/version.rb +1 -1
- data/vendor/lua/moonscript/init.lua +6 -11
- data/vendor/lua/moonscript/version.lua +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc204ab42004ec98bd7db42ccbb3d577d7e35355
|
4
|
+
data.tar.gz: a365e10939e178caa3918cdaba2f385f2753350f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6ab5c2b6b3f0fc72cfe5cf91e16f3f25e10d739dafbe9f00d26c62178b6df06ed437171d19e94abb6844e5d9870569ef67b674efd31ab1b8152039bf09f176d
|
7
|
+
data.tar.gz: 8af330b1958ea7e90d59e09240653674b82b8d930d6384a500c8d0b03bc31146d34187eb08024d7d43eed15e380704d2e0508cd7614fe388ac16d1d5f82c80cd
|
@@ -5,7 +5,7 @@ module Rufus
|
|
5
5
|
subV=File.read(File.expand_path '.subversion', root).strip rescue ''
|
6
6
|
subV="."+subV.gsub(/\W+/, '.') if subV.length>0
|
7
7
|
Path=File.expand_path 'vendor/lua', root
|
8
|
-
m=/(["'])(\d+(\.\d+){1,3}(-(?!0)[\da-z])
|
8
|
+
m=/(["'])(\d+(\.\d+){1,3}(-(?!0)[\da-z]))\1/i.match File.read File.expand_path 'moonscript/version.lua', Path
|
9
9
|
VERSION = m ? m[2].gsub('-', '.')+subV : '0.0.?'
|
10
10
|
end
|
11
11
|
end
|
@@ -7,11 +7,12 @@ do
|
|
7
7
|
split, dump, get_options, unpack = _table_0.split, _table_0.dump, _table_0.get_options, _table_0.unpack
|
8
8
|
end
|
9
9
|
local lua = {
|
10
|
-
loadstring = loadstring
|
10
|
+
loadstring = loadstring,
|
11
|
+
load = load
|
11
12
|
}
|
12
|
-
local dirsep
|
13
|
-
|
14
|
-
|
13
|
+
local dirsep, line_tables, create_moonpath, to_lua, moon_loader, init_loader, loadstring, loadfile, dofile
|
14
|
+
dirsep = "/"
|
15
|
+
line_tables = require("moonscript.line_tables")
|
15
16
|
create_moonpath = function(package_path)
|
16
17
|
local paths = split(package_path, ";")
|
17
18
|
for i, path in ipairs(paths) do
|
@@ -22,7 +23,6 @@ create_moonpath = function(package_path)
|
|
22
23
|
end
|
23
24
|
return concat(paths, ";")
|
24
25
|
end
|
25
|
-
local to_lua
|
26
26
|
to_lua = function(text, options)
|
27
27
|
if options == nil then
|
28
28
|
options = { }
|
@@ -41,10 +41,9 @@ to_lua = function(text, options)
|
|
41
41
|
end
|
42
42
|
return code, ltable
|
43
43
|
end
|
44
|
-
local moon_loader
|
45
44
|
moon_loader = function(name)
|
46
45
|
local name_path = name:gsub("%.", dirsep)
|
47
|
-
local file, file_path
|
46
|
+
local file, file_path
|
48
47
|
local _list_0 = split(package.moonpath, ";")
|
49
48
|
for _index_0 = 1, #_list_0 do
|
50
49
|
local path = _list_0[_index_0]
|
@@ -65,14 +64,12 @@ end
|
|
65
64
|
if not package.moonpath then
|
66
65
|
package.moonpath = create_moonpath(package.path)
|
67
66
|
end
|
68
|
-
local init_loader
|
69
67
|
init_loader = function()
|
70
68
|
return insert(package.loaders or package.searchers, 2, moon_loader)
|
71
69
|
end
|
72
70
|
if not (_G.moon_no_loader) then
|
73
71
|
init_loader()
|
74
72
|
end
|
75
|
-
local loadstring
|
76
73
|
loadstring = function(...)
|
77
74
|
local options, str, chunk_name, mode, env = get_options(...)
|
78
75
|
chunk_name = chunk_name or "=(moonscript.loadstring)"
|
@@ -90,7 +87,6 @@ loadstring = function(...)
|
|
90
87
|
env
|
91
88
|
}))
|
92
89
|
end
|
93
|
-
local loadfile
|
94
90
|
loadfile = function(fname, ...)
|
95
91
|
local file, err = io.open(fname)
|
96
92
|
if not file then
|
@@ -100,7 +96,6 @@ loadfile = function(fname, ...)
|
|
100
96
|
file:close()
|
101
97
|
return loadstring(text, fname, ...)
|
102
98
|
end
|
103
|
-
local dofile
|
104
99
|
dofile = function(...)
|
105
100
|
local f = assert(loadfile(...))
|
106
101
|
return f()
|