rufus-lua-win 5.1.5
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.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +69 -0
- data/Rakefile +1 -0
- data/lib/rufus/lua/win.rb +18 -0
- data/lib/rufus/lua/win/version.rb +7 -0
- data/rufus-lua-win.gemspec +23 -0
- data/vendor/lua/bin/liblua.dll +0 -0
- data/vendor/lua/lib/lua/LuaXml.lua +119 -0
- data/vendor/lua/lib/lua/alien.lua +250 -0
- data/vendor/lua/lib/lua/alien/core.dll +0 -0
- data/vendor/lua/lib/lua/alien/struct.dll +0 -0
- data/vendor/lua/lib/lua/base.lua +536 -0
- data/vendor/lua/lib/lua/bin.lua +20 -0
- data/vendor/lua/lib/lua/bit.dll +0 -0
- data/vendor/lua/lib/lua/cdlua.dll +0 -0
- data/vendor/lua/lib/lua/cdluacontextplus.dll +0 -0
- data/vendor/lua/lib/lua/cdluagl.dll +0 -0
- data/vendor/lua/lib/lua/cdluaim.dll +0 -0
- data/vendor/lua/lib/lua/cdluapdf.dll +0 -0
- data/vendor/lua/lib/lua/copas.lua +543 -0
- data/vendor/lua/lib/lua/coxpcall.lua +57 -0
- data/vendor/lua/lib/lua/date.lua +745 -0
- data/vendor/lua/lib/lua/debug_ext.lua +84 -0
- data/vendor/lua/lib/lua/debug_init.lua +2 -0
- data/vendor/lua/lib/lua/des56.dll +0 -0
- data/vendor/lua/lib/lua/dist/config.lua +109 -0
- data/vendor/lua/lib/lua/dist/constraints.lua +271 -0
- data/vendor/lua/lib/lua/dist/depends.lua +601 -0
- data/vendor/lua/lib/lua/dist/git.lua +307 -0
- data/vendor/lua/lib/lua/dist/init.lua +278 -0
- data/vendor/lua/lib/lua/dist/manifest.lua +225 -0
- data/vendor/lua/lib/lua/dist/package.lua +583 -0
- data/vendor/lua/lib/lua/dist/sys.lua +367 -0
- data/vendor/lua/lib/lua/dist/utils.lua +130 -0
- data/vendor/lua/lib/lua/ex.dll +0 -0
- data/vendor/lua/lib/lua/fstable.lua +116 -0
- data/vendor/lua/lib/lua/getopt.lua +273 -0
- data/vendor/lua/lib/lua/git.lua +5 -0
- data/vendor/lua/lib/lua/git/core.dll +0 -0
- data/vendor/lua/lib/lua/git/objects.lua +121 -0
- data/vendor/lua/lib/lua/git/pack.lua +316 -0
- data/vendor/lua/lib/lua/git/protocol.lua +188 -0
- data/vendor/lua/lib/lua/git/repo.lua +283 -0
- data/vendor/lua/lib/lua/git/util.lua +233 -0
- data/vendor/lua/lib/lua/gzio.dll +0 -0
- data/vendor/lua/lib/lua/gzip.lua +81 -0
- data/vendor/lua/lib/lua/iconv.dll +0 -0
- data/vendor/lua/lib/lua/imlua.dll +0 -0
- data/vendor/lua/lib/lua/imlua_fftw.dll +0 -0
- data/vendor/lua/lib/lua/imlua_jp2.dll +0 -0
- data/vendor/lua/lib/lua/imlua_process.dll +0 -0
- data/vendor/lua/lib/lua/imlua_process_omp.dll +0 -0
- data/vendor/lua/lib/lua/io_ext.lua +115 -0
- data/vendor/lua/lib/lua/iuplua.dll +0 -0
- data/vendor/lua/lib/lua/iuplua_mglplot.dll +0 -0
- data/vendor/lua/lib/lua/iuplua_pplot.dll +0 -0
- data/vendor/lua/lib/lua/iupluacd.dll +0 -0
- data/vendor/lua/lib/lua/iupluacontrols.dll +0 -0
- data/vendor/lua/lib/lua/iupluagl.dll +0 -0
- data/vendor/lua/lib/lua/iupluaim.dll +0 -0
- data/vendor/lua/lib/lua/iupluaimglib.dll +0 -0
- data/vendor/lua/lib/lua/iupluatuio.dll +0 -0
- data/vendor/lua/lib/lua/lanes-keeper.lua +302 -0
- data/vendor/lua/lib/lua/lanes.lua +591 -0
- data/vendor/lua/lib/lua/lanes/core.dll +0 -0
- data/vendor/lua/lib/lua/lcs.lua +55 -0
- data/vendor/lua/lib/lua/lemock.lua +659 -0
- data/vendor/lua/lib/lua/lfs.dll +0 -0
- data/vendor/lua/lib/lua/list.lua +375 -0
- data/vendor/lua/lib/lua/logging.lua +189 -0
- data/vendor/lua/lib/lua/logging/console.lua +22 -0
- data/vendor/lua/lib/lua/logging/email.lua +44 -0
- data/vendor/lua/lib/lua/logging/file.lua +55 -0
- data/vendor/lua/lib/lua/logging/rolling_file.lua +81 -0
- data/vendor/lua/lib/lua/logging/socket.lua +35 -0
- data/vendor/lua/lib/lua/logging/sql.lua +64 -0
- data/vendor/lua/lib/lua/loop/base.lua +68 -0
- data/vendor/lua/lib/lua/loop/cached.lua +312 -0
- data/vendor/lua/lib/lua/loop/collection/MapWithArrayOfKeys.lua +64 -0
- data/vendor/lua/lib/lua/loop/collection/ObjectCache.lua +39 -0
- data/vendor/lua/lib/lua/loop/collection/OrderedSet.lua +164 -0
- data/vendor/lua/lib/lua/loop/collection/PriorityQueue.lua +86 -0
- data/vendor/lua/lib/lua/loop/collection/UnorderedArray.lua +32 -0
- data/vendor/lua/lib/lua/loop/collection/UnorderedArraySet.lua +56 -0
- data/vendor/lua/lib/lua/loop/compiler/Arguments.lua +108 -0
- data/vendor/lua/lib/lua/loop/compiler/Conditional.lua +50 -0
- data/vendor/lua/lib/lua/loop/compiler/Expression.lua +215 -0
- data/vendor/lua/lib/lua/loop/component/base.lua +221 -0
- data/vendor/lua/lib/lua/loop/component/contained.lua +71 -0
- data/vendor/lua/lib/lua/loop/component/dynamic.lua +223 -0
- data/vendor/lua/lib/lua/loop/component/intercepted.lua +354 -0
- data/vendor/lua/lib/lua/loop/component/wrapped.lua +195 -0
- data/vendor/lua/lib/lua/loop/debug/Inspector.lua +521 -0
- data/vendor/lua/lib/lua/loop/debug/Matcher.lua +192 -0
- data/vendor/lua/lib/lua/loop/debug/Verbose.lua +266 -0
- data/vendor/lua/lib/lua/loop/debug/Viewer.lua +200 -0
- data/vendor/lua/lib/lua/loop/multiple.lua +105 -0
- data/vendor/lua/lib/lua/loop/object/Exception.lua +57 -0
- data/vendor/lua/lib/lua/loop/object/Publisher.lua +43 -0
- data/vendor/lua/lib/lua/loop/object/Wrapper.lua +39 -0
- data/vendor/lua/lib/lua/loop/scoped.lua +585 -0
- data/vendor/lua/lib/lua/loop/serial/FileStream.lua +48 -0
- data/vendor/lua/lib/lua/loop/serial/Serializer.lua +291 -0
- data/vendor/lua/lib/lua/loop/serial/SocketStream.lua +51 -0
- data/vendor/lua/lib/lua/loop/serial/StringStream.lua +47 -0
- data/vendor/lua/lib/lua/loop/simple.lua +75 -0
- data/vendor/lua/lib/lua/loop/table.lua +71 -0
- data/vendor/lua/lib/lua/loop/thread/CoSocket.lua +416 -0
- data/vendor/lua/lib/lua/loop/thread/IOScheduler.lua +170 -0
- data/vendor/lua/lib/lua/loop/thread/Scheduler.lua +327 -0
- data/vendor/lua/lib/lua/loop/thread/SocketScheduler.lua +88 -0
- data/vendor/lua/lib/lua/loop/thread/Timer.lua +54 -0
- data/vendor/lua/lib/lua/lpeg.dll +0 -0
- data/vendor/lua/lib/lua/ltn12.lua +292 -0
- data/vendor/lua/lib/lua/luaXML_lib.dll +0 -0
- data/vendor/lua/lib/lua/luacurl.dll +0 -0
- data/vendor/lua/lib/lua/luadoc/config.lua +34 -0
- data/vendor/lua/lib/lua/luadoc/doclet/debug.lua +46 -0
- data/vendor/lua/lib/lua/luadoc/doclet/formatter.lua +84 -0
- data/vendor/lua/lib/lua/luadoc/doclet/html.lua +289 -0
- data/vendor/lua/lib/lua/luadoc/doclet/html/file.lp +113 -0
- data/vendor/lua/lib/lua/luadoc/doclet/html/function.lp +64 -0
- data/vendor/lua/lib/lua/luadoc/doclet/html/index.lp +70 -0
- data/vendor/lua/lib/lua/luadoc/doclet/html/luadoc.css +286 -0
- data/vendor/lua/lib/lua/luadoc/doclet/html/menu.lp +55 -0
- data/vendor/lua/lib/lua/luadoc/doclet/html/module.lp +109 -0
- data/vendor/lua/lib/lua/luadoc/doclet/html/table.lp +15 -0
- data/vendor/lua/lib/lua/luadoc/doclet/raw.lua +12 -0
- data/vendor/lua/lib/lua/luadoc/init.lua +58 -0
- data/vendor/lua/lib/lua/luadoc/lp.lua +130 -0
- data/vendor/lua/lib/lua/luadoc/taglet/standard.lua +495 -0
- data/vendor/lua/lib/lua/luadoc/taglet/standard/tags.lua +171 -0
- data/vendor/lua/lib/lua/luadoc/util.lua +233 -0
- data/vendor/lua/lib/lua/luagl.dll +0 -0
- data/vendor/lua/lib/lua/luaglu.dll +0 -0
- data/vendor/lua/lib/lua/luaidl.lua +113 -0
- data/vendor/lua/lib/lua/luaidl/lex.lua +793 -0
- data/vendor/lua/lib/lua/luaidl/pre.lua +149 -0
- data/vendor/lua/lib/lua/luaidl/sin.lua +3631 -0
- data/vendor/lua/lib/lua/luarocks/add.lua +108 -0
- data/vendor/lua/lib/lua/luarocks/admin_remove.lua +87 -0
- data/vendor/lua/lib/lua/luarocks/build.lua +330 -0
- data/vendor/lua/lib/lua/luarocks/build/builtin.lua +253 -0
- data/vendor/lua/lib/lua/luarocks/build/cmake.lua +54 -0
- data/vendor/lua/lib/lua/luarocks/build/command.lua +32 -0
- data/vendor/lua/lib/lua/luarocks/build/make.lua +92 -0
- data/vendor/lua/lib/lua/luarocks/cache.lua +85 -0
- data/vendor/lua/lib/lua/luarocks/cfg.lua +449 -0
- data/vendor/lua/lib/lua/luarocks/command_line.lua +163 -0
- data/vendor/lua/lib/lua/luarocks/deps.lua +654 -0
- data/vendor/lua/lib/lua/luarocks/dir.lua +69 -0
- data/vendor/lua/lib/lua/luarocks/download.lua +90 -0
- data/vendor/lua/lib/lua/luarocks/fetch.lua +321 -0
- data/vendor/lua/lib/lua/luarocks/fetch/cvs.lua +44 -0
- data/vendor/lua/lib/lua/luarocks/fetch/git.lua +81 -0
- data/vendor/lua/lib/lua/luarocks/fetch/git_file.lua +17 -0
- data/vendor/lua/lib/lua/luarocks/fetch/hg.lua +54 -0
- data/vendor/lua/lib/lua/luarocks/fetch/sscm.lua +42 -0
- data/vendor/lua/lib/lua/luarocks/fetch/svn.lua +53 -0
- data/vendor/lua/lib/lua/luarocks/fs.lua +40 -0
- data/vendor/lua/lib/lua/luarocks/fs/lua.lua +676 -0
- data/vendor/lua/lib/lua/luarocks/fs/unix.lua +88 -0
- data/vendor/lua/lib/lua/luarocks/fs/unix/tools.lua +325 -0
- data/vendor/lua/lib/lua/luarocks/fs/win32.lua +107 -0
- data/vendor/lua/lib/lua/luarocks/fs/win32/tools.lua +334 -0
- data/vendor/lua/lib/lua/luarocks/help.lua +101 -0
- data/vendor/lua/lib/lua/luarocks/index.lua +172 -0
- data/vendor/lua/lib/lua/luarocks/install.lua +151 -0
- data/vendor/lua/lib/lua/luarocks/list.lua +35 -0
- data/vendor/lua/lib/lua/luarocks/loader.lua +228 -0
- data/vendor/lua/lib/lua/luarocks/make.lua +71 -0
- data/vendor/lua/lib/lua/luarocks/make_manifest.lua +34 -0
- data/vendor/lua/lib/lua/luarocks/manif.lua +360 -0
- data/vendor/lua/lib/lua/luarocks/manif_core.lua +75 -0
- data/vendor/lua/lib/lua/luarocks/new_version.lua +141 -0
- data/vendor/lua/lib/lua/luarocks/pack.lua +205 -0
- data/vendor/lua/lib/lua/luarocks/path.lua +315 -0
- data/vendor/lua/lib/lua/luarocks/persist.lua +173 -0
- data/vendor/lua/lib/lua/luarocks/refresh_cache.lua +30 -0
- data/vendor/lua/lib/lua/luarocks/remove.lua +135 -0
- data/vendor/lua/lib/lua/luarocks/rep.lua +313 -0
- data/vendor/lua/lib/lua/luarocks/require.lua +6 -0
- data/vendor/lua/lib/lua/luarocks/search.lua +399 -0
- data/vendor/lua/lib/lua/luarocks/show.lua +138 -0
- data/vendor/lua/lib/lua/luarocks/site_config.lua +23 -0
- data/vendor/lua/lib/lua/luarocks/tools/patch.lua +712 -0
- data/vendor/lua/lib/lua/luarocks/tools/tar.lua +144 -0
- data/vendor/lua/lib/lua/luarocks/tools/zip.lua +245 -0
- data/vendor/lua/lib/lua/luarocks/type_check.lua +267 -0
- data/vendor/lua/lib/lua/luarocks/unpack.lua +151 -0
- data/vendor/lua/lib/lua/luarocks/util.lua +420 -0
- data/vendor/lua/lib/lua/luarocks/validate.lua +164 -0
- data/vendor/lua/lib/lua/luars232.dll +0 -0
- data/vendor/lua/lib/lua/luasql/mysql.dll +0 -0
- data/vendor/lua/lib/lua/luasql/postgres.dll +0 -0
- data/vendor/lua/lib/lua/luasql/sqlite3.dll +0 -0
- data/vendor/lua/lib/lua/luaunit.lua +601 -0
- data/vendor/lua/lib/lua/lxp.dll +0 -0
- data/vendor/lua/lib/lua/lxp/lom.lua +60 -0
- data/vendor/lua/lib/lua/math_ext.lua +27 -0
- data/vendor/lua/lib/lua/mbox.lua +53 -0
- data/vendor/lua/lib/lua/md5.lua +19 -0
- data/vendor/lua/lib/lua/md5/core.dll +0 -0
- data/vendor/lua/lib/lua/metalua.lua +0 -0
- data/vendor/lua/lib/lua/metalua/ast_to_string.mlua +553 -0
- data/vendor/lua/lib/lua/metalua/base.lua +104 -0
- data/vendor/lua/lib/lua/metalua/bytecode.lua +0 -0
- data/vendor/lua/lib/lua/metalua/clopts.mlua +204 -0
- data/vendor/lua/lib/lua/metalua/compiler.lua +3 -0
- data/vendor/lua/lib/lua/metalua/dollar.mlua +24 -0
- data/vendor/lua/lib/lua/metalua/extension/H-runtime.mlua +216 -0
- data/vendor/lua/lib/lua/metalua/extension/H.mlua +22 -0
- data/vendor/lua/lib/lua/metalua/extension/anaphoric.mlua +54 -0
- data/vendor/lua/lib/lua/metalua/extension/clist.mlua +149 -0
- data/vendor/lua/lib/lua/metalua/extension/continue.mlua +53 -0
- data/vendor/lua/lib/lua/metalua/extension/localin.mlua +2 -0
- data/vendor/lua/lib/lua/metalua/extension/log.mlua +39 -0
- data/vendor/lua/lib/lua/metalua/extension/match.mlua +374 -0
- data/vendor/lua/lib/lua/metalua/extension/ternary.mlua +10 -0
- data/vendor/lua/lib/lua/metalua/extension/trycatch.mlua +189 -0
- data/vendor/lua/lib/lua/metalua/extension/types-runtime.mlua +159 -0
- data/vendor/lua/lib/lua/metalua/extension/types.mlua +352 -0
- data/vendor/lua/lib/lua/metalua/extension/withdo.mlua +30 -0
- data/vendor/lua/lib/lua/metalua/extension/xglobal-runtime.lua +41 -0
- data/vendor/lua/lib/lua/metalua/extension/xglobal.mlua +20 -0
- data/vendor/lua/lib/lua/metalua/extension/xloop.mlua +100 -0
- data/vendor/lua/lib/lua/metalua/extension/xmatch.mlua +216 -0
- data/vendor/lua/lib/lua/metalua/metaloop.mlua +76 -0
- data/vendor/lua/lib/lua/metalua/mlc.lua +0 -0
- data/vendor/lua/lib/lua/metalua/mlc_xcall.lua +119 -0
- data/vendor/lua/lib/lua/metalua/mlp.lua +0 -0
- data/vendor/lua/lib/lua/metalua/package2.lua +101 -0
- data/vendor/lua/lib/lua/metalua/runtime.lua +3 -0
- data/vendor/lua/lib/lua/metalua/string2.lua +44 -0
- data/vendor/lua/lib/lua/metalua/table2.lua +372 -0
- data/vendor/lua/lib/lua/metalua/walk.mlua +304 -0
- data/vendor/lua/lib/lua/metalua/walk/bindings.mlua +41 -0
- data/vendor/lua/lib/lua/metalua/walk/id.mlua +186 -0
- data/vendor/lua/lib/lua/metalua/walk/scope.lua +54 -0
- data/vendor/lua/lib/lua/mime.lua +87 -0
- data/vendor/lua/lib/lua/mime/core.dll +0 -0
- data/vendor/lua/lib/lua/mobdebug.lua +1484 -0
- data/vendor/lua/lib/lua/modules.lua +16 -0
- data/vendor/lua/lib/lua/object.lua +56 -0
- data/vendor/lua/lib/lua/oil/Exception.lua +26 -0
- data/vendor/lua/lib/lua/oil/arch.lua +27 -0
- data/vendor/lua/lib/lua/oil/arch/basic/client.lua +29 -0
- data/vendor/lua/lib/lua/oil/arch/basic/common.lua +13 -0
- data/vendor/lua/lib/lua/oil/arch/basic/server.lua +27 -0
- data/vendor/lua/lib/lua/oil/arch/cooperative/common.lua +10 -0
- data/vendor/lua/lib/lua/oil/arch/cooperative/server.lua +16 -0
- data/vendor/lua/lib/lua/oil/arch/corba/client.lua +39 -0
- data/vendor/lua/lib/lua/oil/arch/corba/common.lua +58 -0
- data/vendor/lua/lib/lua/oil/arch/corba/intercepted/client.lua +9 -0
- data/vendor/lua/lib/lua/oil/arch/corba/intercepted/server.lua +9 -0
- data/vendor/lua/lib/lua/oil/arch/corba/server.lua +35 -0
- data/vendor/lua/lib/lua/oil/arch/ludo/byref.lua +18 -0
- data/vendor/lua/lib/lua/oil/arch/ludo/client.lua +19 -0
- data/vendor/lua/lib/lua/oil/arch/ludo/common.lua +18 -0
- data/vendor/lua/lib/lua/oil/arch/ludo/server.lua +19 -0
- data/vendor/lua/lib/lua/oil/arch/typed/client.lua +27 -0
- data/vendor/lua/lib/lua/oil/arch/typed/common.lua +9 -0
- data/vendor/lua/lib/lua/oil/arch/typed/server.lua +18 -0
- data/vendor/lua/lib/lua/oil/assert.lua +87 -0
- data/vendor/lua/lib/lua/oil/builder.lua +45 -0
- data/vendor/lua/lib/lua/oil/builder/basic/client.lua +31 -0
- data/vendor/lua/lib/lua/oil/builder/basic/common.lua +11 -0
- data/vendor/lua/lib/lua/oil/builder/basic/server.lua +13 -0
- data/vendor/lua/lib/lua/oil/builder/cooperative/common.lua +11 -0
- data/vendor/lua/lib/lua/oil/builder/cooperative/server.lua +11 -0
- data/vendor/lua/lib/lua/oil/builder/corba/client.lua +13 -0
- data/vendor/lua/lib/lua/oil/builder/corba/common.lua +24 -0
- data/vendor/lua/lib/lua/oil/builder/corba/gencode.lua +13 -0
- data/vendor/lua/lib/lua/oil/builder/corba/intercepted/client.lua +11 -0
- data/vendor/lua/lib/lua/oil/builder/corba/intercepted/server.lua +11 -0
- data/vendor/lua/lib/lua/oil/builder/corba/server.lua +13 -0
- data/vendor/lua/lib/lua/oil/builder/lua/client.lua +11 -0
- data/vendor/lua/lib/lua/oil/builder/lua/server.lua +12 -0
- data/vendor/lua/lib/lua/oil/builder/ludo/byref.lua +13 -0
- data/vendor/lua/lib/lua/oil/builder/ludo/client.lua +13 -0
- data/vendor/lua/lib/lua/oil/builder/ludo/common.lua +14 -0
- data/vendor/lua/lib/lua/oil/builder/ludo/server.lua +13 -0
- data/vendor/lua/lib/lua/oil/builder/typed/client.lua +16 -0
- data/vendor/lua/lib/lua/oil/builder/typed/server.lua +12 -0
- data/vendor/lua/lib/lua/oil/compat.lua +846 -0
- data/vendor/lua/lib/lua/oil/component.lua +1 -0
- data/vendor/lua/lib/lua/oil/corba/giop.lua +301 -0
- data/vendor/lua/lib/lua/oil/corba/giop/Codec.lua +1568 -0
- data/vendor/lua/lib/lua/oil/corba/giop/CodecGen.lua +589 -0
- data/vendor/lua/lib/lua/oil/corba/giop/Exception.lua +25 -0
- data/vendor/lua/lib/lua/oil/corba/giop/Indexer.lua +63 -0
- data/vendor/lua/lib/lua/oil/corba/giop/Listener.lua +343 -0
- data/vendor/lua/lib/lua/oil/corba/giop/Messenger.lua +228 -0
- data/vendor/lua/lib/lua/oil/corba/giop/Referrer.lua +180 -0
- data/vendor/lua/lib/lua/oil/corba/giop/Requester.lua +462 -0
- data/vendor/lua/lib/lua/oil/corba/idl.lua +597 -0
- data/vendor/lua/lib/lua/oil/corba/idl/Compiler.lua +133 -0
- data/vendor/lua/lib/lua/oil/corba/idl/Importer.lua +235 -0
- data/vendor/lua/lib/lua/oil/corba/idl/Indexer.lua +95 -0
- data/vendor/lua/lib/lua/oil/corba/idl/Registry.lua +1821 -0
- data/vendor/lua/lib/lua/oil/corba/idl/ir.lua +847 -0
- data/vendor/lua/lib/lua/oil/corba/idl/sysex.lua +21 -0
- data/vendor/lua/lib/lua/oil/corba/iiop/Profiler.lua +200 -0
- data/vendor/lua/lib/lua/oil/corba/intercepted/Listener.lua +158 -0
- data/vendor/lua/lib/lua/oil/corba/intercepted/Requester.lua +181 -0
- data/vendor/lua/lib/lua/oil/corba/services/event.lua +126 -0
- data/vendor/lua/lib/lua/oil/corba/services/event/ConsumerAdmin.lua +50 -0
- data/vendor/lua/lib/lua/oil/corba/services/event/EventFactory.lua +15 -0
- data/vendor/lua/lib/lua/oil/corba/services/event/EventQueue.lua +37 -0
- data/vendor/lua/lib/lua/oil/corba/services/event/ProxyPushConsumer.lua +75 -0
- data/vendor/lua/lib/lua/oil/corba/services/event/ProxyPushSupplier.lua +62 -0
- data/vendor/lua/lib/lua/oil/corba/services/event/SingleDeferredDispatcher.lua +60 -0
- data/vendor/lua/lib/lua/oil/corba/services/event/SingleSynchronousDispatcher.lua +39 -0
- data/vendor/lua/lib/lua/oil/corba/services/event/SupplierAdmin.lua +50 -0
- data/vendor/lua/lib/lua/oil/corba/services/naming.lua +436 -0
- data/vendor/lua/lib/lua/oil/kernel/base/Acceptor.lua +268 -0
- data/vendor/lua/lib/lua/oil/kernel/base/Channels.lua +121 -0
- data/vendor/lua/lib/lua/oil/kernel/base/Connector.lua +147 -0
- data/vendor/lua/lib/lua/oil/kernel/base/Dispatcher.lua +99 -0
- data/vendor/lua/lib/lua/oil/kernel/base/Proxies.lua +86 -0
- data/vendor/lua/lib/lua/oil/kernel/base/Proxies/asynchronous.lua +56 -0
- data/vendor/lua/lib/lua/oil/kernel/base/Proxies/protected.lua +17 -0
- data/vendor/lua/lib/lua/oil/kernel/base/Proxies/synchronous.lua +17 -0
- data/vendor/lua/lib/lua/oil/kernel/base/Proxies/utils.lua +29 -0
- data/vendor/lua/lib/lua/oil/kernel/base/Receiver.lua +110 -0
- data/vendor/lua/lib/lua/oil/kernel/base/Servants.lua +207 -0
- data/vendor/lua/lib/lua/oil/kernel/base/Sockets.lua +44 -0
- data/vendor/lua/lib/lua/oil/kernel/cooperative/Receiver.lua +139 -0
- data/vendor/lua/lib/lua/oil/kernel/intercepted/Listener.lua +47 -0
- data/vendor/lua/lib/lua/oil/kernel/intercepted/Requester.lua +58 -0
- data/vendor/lua/lib/lua/oil/kernel/lua/Dispatcher.lua +76 -0
- data/vendor/lua/lib/lua/oil/kernel/lua/Proxies.lua +69 -0
- data/vendor/lua/lib/lua/oil/kernel/typed/Dispatcher.lua +91 -0
- data/vendor/lua/lib/lua/oil/kernel/typed/Proxies.lua +153 -0
- data/vendor/lua/lib/lua/oil/kernel/typed/Servants.lua +137 -0
- data/vendor/lua/lib/lua/oil/ludo/Codec.lua +66 -0
- data/vendor/lua/lib/lua/oil/ludo/CodecByRef.lua +103 -0
- data/vendor/lua/lib/lua/oil/ludo/Listener.lua +151 -0
- data/vendor/lua/lib/lua/oil/ludo/Referrer.lua +72 -0
- data/vendor/lua/lib/lua/oil/ludo/Requester.lua +107 -0
- data/vendor/lua/lib/lua/oil/oo.lua +1 -0
- data/vendor/lua/lib/lua/oil/port.lua +1 -0
- data/vendor/lua/lib/lua/oil/properties.lua +57 -0
- data/vendor/lua/lib/lua/oil/verbose.lua +133 -0
- data/vendor/lua/lib/lua/package_ext.lua +15 -0
- data/vendor/lua/lib/lua/parser.lua +268 -0
- data/vendor/lua/lib/lua/pl/Date.lua +555 -0
- data/vendor/lua/lib/lua/pl/List.lua +613 -0
- data/vendor/lua/lib/lua/pl/Map.lua +113 -0
- data/vendor/lua/lib/lua/pl/MultiMap.lua +62 -0
- data/vendor/lua/lib/lua/pl/OrderedMap.lua +151 -0
- data/vendor/lua/lib/lua/pl/Set.lua +153 -0
- data/vendor/lua/lib/lua/pl/app.lua +165 -0
- data/vendor/lua/lib/lua/pl/array2d.lua +501 -0
- data/vendor/lua/lib/lua/pl/class.lua +180 -0
- data/vendor/lua/lib/lua/pl/comprehension.lua +286 -0
- data/vendor/lua/lib/lua/pl/config.lua +176 -0
- data/vendor/lua/lib/lua/pl/data.lua +606 -0
- data/vendor/lua/lib/lua/pl/dir.lua +475 -0
- data/vendor/lua/lib/lua/pl/file.lua +70 -0
- data/vendor/lua/lib/lua/pl/func.lua +376 -0
- data/vendor/lua/lib/lua/pl/init.lua +68 -0
- data/vendor/lua/lib/lua/pl/input.lua +173 -0
- data/vendor/lua/lib/lua/pl/lapp.lua +407 -0
- data/vendor/lua/lib/lua/pl/lexer.lua +456 -0
- data/vendor/lua/lib/lua/pl/luabalanced.lua +264 -0
- data/vendor/lua/lib/lua/pl/operator.lua +201 -0
- data/vendor/lua/lib/lua/pl/path.lua +398 -0
- data/vendor/lua/lib/lua/pl/permute.lua +63 -0
- data/vendor/lua/lib/lua/pl/platf/luajava.lua +101 -0
- data/vendor/lua/lib/lua/pl/pretty.lua +285 -0
- data/vendor/lua/lib/lua/pl/seq.lua +551 -0
- data/vendor/lua/lib/lua/pl/sip.lua +344 -0
- data/vendor/lua/lib/lua/pl/strict.lua +70 -0
- data/vendor/lua/lib/lua/pl/stringio.lua +158 -0
- data/vendor/lua/lib/lua/pl/stringx.lua +440 -0
- data/vendor/lua/lib/lua/pl/tablex.lua +817 -0
- data/vendor/lua/lib/lua/pl/template.lua +103 -0
- data/vendor/lua/lib/lua/pl/test.lua +135 -0
- data/vendor/lua/lib/lua/pl/text.lua +243 -0
- data/vendor/lua/lib/lua/pl/utils.lua +550 -0
- data/vendor/lua/lib/lua/pl/xml.lua +689 -0
- data/vendor/lua/lib/lua/profiler.dll +0 -0
- data/vendor/lua/lib/lua/re.lua +248 -0
- data/vendor/lua/lib/lua/rex_onig.dll +0 -0
- data/vendor/lua/lib/lua/rex_pcre.dll +0 -0
- data/vendor/lua/lib/lua/rex_posix.dll +0 -0
- data/vendor/lua/lib/lua/rings.dll +0 -0
- data/vendor/lua/lib/lua/serialize.lua +193 -0
- data/vendor/lua/lib/lua/set.lua +149 -0
- data/vendor/lua/lib/lua/socket.lua +133 -0
- data/vendor/lua/lib/lua/socket/core.dll +0 -0
- data/vendor/lua/lib/lua/socket/ftp.lua +281 -0
- data/vendor/lua/lib/lua/socket/http.lua +350 -0
- data/vendor/lua/lib/lua/socket/smtp.lua +251 -0
- data/vendor/lua/lib/lua/socket/tp.lua +123 -0
- data/vendor/lua/lib/lua/socket/url.lua +297 -0
- data/vendor/lua/lib/lua/ssl.dll +0 -0
- data/vendor/lua/lib/lua/ssl.lua +93 -0
- data/vendor/lua/lib/lua/ssl/https.lua +138 -0
- data/vendor/lua/lib/lua/stable.lua +28 -0
- data/vendor/lua/lib/lua/std.lua +16 -0
- data/vendor/lua/lib/lua/strbuf.lua +32 -0
- data/vendor/lua/lib/lua/strict.lua +45 -0
- data/vendor/lua/lib/lua/string_ext.lua +274 -0
- data/vendor/lua/lib/lua/table_ext.lua +117 -0
- data/vendor/lua/lib/lua/tar.lua +262 -0
- data/vendor/lua/lib/lua/task.dll +0 -0
- data/vendor/lua/lib/lua/tree.lua +81 -0
- data/vendor/lua/lib/lua/unicode.dll +0 -0
- data/vendor/lua/lib/lua/verbose_require.lua +11 -0
- data/vendor/lua/lib/lua/vstruct.lua +86 -0
- data/vendor/lua/lib/lua/vstruct/ast.lua +192 -0
- data/vendor/lua/lib/lua/vstruct/ast/Bitpack.lua +33 -0
- data/vendor/lua/lib/lua/vstruct/ast/Generator.lua +174 -0
- data/vendor/lua/lib/lua/vstruct/ast/IO.lua +45 -0
- data/vendor/lua/lib/lua/vstruct/ast/List.lua +56 -0
- data/vendor/lua/lib/lua/vstruct/ast/Name.lua +20 -0
- data/vendor/lua/lib/lua/vstruct/ast/Repeat.lua +23 -0
- data/vendor/lua/lib/lua/vstruct/ast/Root.lua +19 -0
- data/vendor/lua/lib/lua/vstruct/ast/Table.lua +65 -0
- data/vendor/lua/lib/lua/vstruct/cursor.lua +81 -0
- data/vendor/lua/lib/lua/vstruct/io.lua +45 -0
- data/vendor/lua/lib/lua/vstruct/io/a.lua +24 -0
- data/vendor/lua/lib/lua/vstruct/io/b.lua +28 -0
- data/vendor/lua/lib/lua/vstruct/io/bigendian.lua +21 -0
- data/vendor/lua/lib/lua/vstruct/io/c.lua +25 -0
- data/vendor/lua/lib/lua/vstruct/io/defaults.lua +24 -0
- data/vendor/lua/lib/lua/vstruct/io/endianness.lua +41 -0
- data/vendor/lua/lib/lua/vstruct/io/f.lua +129 -0
- data/vendor/lua/lib/lua/vstruct/io/hostendian.lua +21 -0
- data/vendor/lua/lib/lua/vstruct/io/i.lua +42 -0
- data/vendor/lua/lib/lua/vstruct/io/littleendian.lua +21 -0
- data/vendor/lua/lib/lua/vstruct/io/m.lua +62 -0
- data/vendor/lua/lib/lua/vstruct/io/p.lua +23 -0
- data/vendor/lua/lib/lua/vstruct/io/s.lua +27 -0
- data/vendor/lua/lib/lua/vstruct/io/seekb.lua +18 -0
- data/vendor/lua/lib/lua/vstruct/io/seekf.lua +18 -0
- data/vendor/lua/lib/lua/vstruct/io/seekto.lua +18 -0
- data/vendor/lua/lib/lua/vstruct/io/u.lua +54 -0
- data/vendor/lua/lib/lua/vstruct/io/x.lua +34 -0
- data/vendor/lua/lib/lua/vstruct/io/z.lua +63 -0
- data/vendor/lua/lib/lua/vstruct/lexer.lua +100 -0
- data/vendor/lua/lib/lua/vstruct/pack.lua +142 -0
- data/vendor/lua/lib/lua/vstruct/test.lua +47 -0
- data/vendor/lua/lib/lua/vstruct/test/basic.lua +73 -0
- data/vendor/lua/lib/lua/vstruct/test/common.lua +100 -0
- data/vendor/lua/lib/lua/vstruct/test/fp-bigendian.lua +56 -0
- data/vendor/lua/lib/lua/vstruct/test/fp-littleendian.lua +56 -0
- data/vendor/lua/lib/lua/vstruct/test/struct-test-gen.lua +1230 -0
- data/vendor/lua/lib/lua/vstruct/unpack.lua +126 -0
- data/vendor/lua/lib/lua/wx.dll +0 -0
- data/vendor/lua/lib/lua/xml.lua +75 -0
- data/vendor/lua/lib/lua/zip.dll +0 -0
- data/vendor/lua/lib/lua/zlib.dll +0 -0
- metadata +529 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
--- Module implementing the luarocks-admin "make_manifest" command.
|
|
3
|
+
-- Compile a manifest file for a repository.
|
|
4
|
+
module("luarocks.make_manifest", package.seeall)
|
|
5
|
+
|
|
6
|
+
local manif = require("luarocks.manif")
|
|
7
|
+
local index = require("luarocks.index")
|
|
8
|
+
local cfg = require("luarocks.cfg")
|
|
9
|
+
local util = require("luarocks.util")
|
|
10
|
+
|
|
11
|
+
help_summary = "Compile a manifest file for a repository."
|
|
12
|
+
|
|
13
|
+
help = [[
|
|
14
|
+
<argument>, if given, is a local repository pathname.
|
|
15
|
+
]]
|
|
16
|
+
|
|
17
|
+
--- Driver function for "make_manifest" command.
|
|
18
|
+
-- @param repo string or nil: Pathname of a local repository. If not given,
|
|
19
|
+
-- the default local repository configured as cfg.rocks_dir is used.
|
|
20
|
+
-- @return boolean or (nil, string): True if manifest was generated,
|
|
21
|
+
-- or nil and an error message.
|
|
22
|
+
function run(repo)
|
|
23
|
+
assert(type(repo) == "string" or not repo)
|
|
24
|
+
repo = repo or cfg.rocks_dir
|
|
25
|
+
|
|
26
|
+
util.printout("Making manifest for "..repo)
|
|
27
|
+
|
|
28
|
+
local ok, err = manif.make_manifest(repo)
|
|
29
|
+
if ok then
|
|
30
|
+
util.printout("Generating index.html for "..repo)
|
|
31
|
+
index.make_index(repo)
|
|
32
|
+
end
|
|
33
|
+
return ok, err
|
|
34
|
+
end
|
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
|
|
2
|
+
--- Module for handling manifest files and tables.
|
|
3
|
+
-- Manifest files describe the contents of a LuaRocks tree or server.
|
|
4
|
+
-- They are loaded into manifest tables, which are then used for
|
|
5
|
+
-- performing searches, matching dependencies, etc.
|
|
6
|
+
module("luarocks.manif", package.seeall)
|
|
7
|
+
|
|
8
|
+
local manif_core = require("luarocks.manif_core")
|
|
9
|
+
local persist = require("luarocks.persist")
|
|
10
|
+
local fetch = require("luarocks.fetch")
|
|
11
|
+
local dir = require("luarocks.dir")
|
|
12
|
+
local fs = require("luarocks.fs")
|
|
13
|
+
local search = require("luarocks.search")
|
|
14
|
+
local util = require("luarocks.util")
|
|
15
|
+
local cfg = require("luarocks.cfg")
|
|
16
|
+
local path = require("luarocks.path")
|
|
17
|
+
local rep = require("luarocks.rep")
|
|
18
|
+
local deps = require("luarocks.deps")
|
|
19
|
+
|
|
20
|
+
rock_manifest_cache = {}
|
|
21
|
+
|
|
22
|
+
--- Commit a table to disk in given local path.
|
|
23
|
+
-- @param where string: The directory where the table should be saved.
|
|
24
|
+
-- @param name string: The filename.
|
|
25
|
+
-- @param tbl table: The table to be saved.
|
|
26
|
+
-- @return boolean or (nil, string): true if successful, or nil and a
|
|
27
|
+
-- message in case of errors.
|
|
28
|
+
local function save_table(where, name, tbl)
|
|
29
|
+
assert(type(where) == "string")
|
|
30
|
+
assert(type(name) == "string")
|
|
31
|
+
assert(type(tbl) == "table")
|
|
32
|
+
|
|
33
|
+
local filename = dir.path(where, name)
|
|
34
|
+
return persist.save_from_table(filename, tbl)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
function load_rock_manifest(name, version, root)
|
|
38
|
+
assert(type(name) == "string")
|
|
39
|
+
assert(type(version) == "string")
|
|
40
|
+
|
|
41
|
+
local name_version = name.."/"..version
|
|
42
|
+
if rock_manifest_cache[name_version] then
|
|
43
|
+
return rock_manifest_cache[name_version].rock_manifest
|
|
44
|
+
end
|
|
45
|
+
local pathname = path.rock_manifest_file(name, version, root)
|
|
46
|
+
local rock_manifest = persist.load_into_table(pathname)
|
|
47
|
+
if not rock_manifest then return nil end
|
|
48
|
+
rock_manifest_cache[name_version] = rock_manifest
|
|
49
|
+
return rock_manifest.rock_manifest
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
function make_rock_manifest(name, version)
|
|
53
|
+
local install_dir = path.install_dir(name, version)
|
|
54
|
+
local rock_manifest = path.rock_manifest_file(name, version)
|
|
55
|
+
local tree = {}
|
|
56
|
+
for _, file in ipairs(fs.find(install_dir)) do
|
|
57
|
+
local full_path = dir.path(install_dir, file)
|
|
58
|
+
local walk = tree
|
|
59
|
+
local last
|
|
60
|
+
local last_name
|
|
61
|
+
for name in file:gmatch("[^/]+") do
|
|
62
|
+
local next = walk[name]
|
|
63
|
+
if not next then
|
|
64
|
+
next = {}
|
|
65
|
+
walk[name] = next
|
|
66
|
+
end
|
|
67
|
+
last = walk
|
|
68
|
+
last_name = name
|
|
69
|
+
walk = next
|
|
70
|
+
end
|
|
71
|
+
if fs.is_file(full_path) then
|
|
72
|
+
last[last_name] = fs.get_md5(full_path)
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
local rock_manifest = { rock_manifest=tree }
|
|
76
|
+
rock_manifest_cache[name.."/"..version] = rock_manifest
|
|
77
|
+
save_table(install_dir, "rock_manifest", rock_manifest )
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
--- Load a local or remote manifest describing a repository.
|
|
81
|
+
-- All functions that use manifest tables assume they were obtained
|
|
82
|
+
-- through either this function or load_local_manifest.
|
|
83
|
+
-- @param repo_url string: URL or pathname for the repository.
|
|
84
|
+
-- @return table or (nil, string, [string]): A table representing the manifest,
|
|
85
|
+
-- or nil followed by an error message and an optional error code.
|
|
86
|
+
function load_manifest(repo_url)
|
|
87
|
+
assert(type(repo_url) == "string")
|
|
88
|
+
|
|
89
|
+
if manif_core.manifest_cache[repo_url] then
|
|
90
|
+
return manif_core.manifest_cache[repo_url]
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
local protocol, pathname = dir.split_url(repo_url)
|
|
94
|
+
if protocol == "file" then
|
|
95
|
+
pathname = dir.path(pathname, "manifest")
|
|
96
|
+
else
|
|
97
|
+
local url = dir.path(repo_url, "manifest")
|
|
98
|
+
local name = repo_url:gsub("[/:]","_")
|
|
99
|
+
local file, err, errcode = fetch.fetch_url_at_temp_dir(url, "luarocks-manifest-"..name)
|
|
100
|
+
if not file then
|
|
101
|
+
return nil, "Failed fetching manifest for "..repo_url..(err and " - "..err or ""), errcode
|
|
102
|
+
end
|
|
103
|
+
pathname = file
|
|
104
|
+
end
|
|
105
|
+
return manif_core.manifest_loader(pathname, repo_url)
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
--- Output a table listing items of a package.
|
|
109
|
+
-- @param itemsfn function: a function for obtaining items of a package.
|
|
110
|
+
-- pkg and version will be passed to it; it should return a table with
|
|
111
|
+
-- items as keys.
|
|
112
|
+
-- @param pkg string: package name
|
|
113
|
+
-- @param version string: package version
|
|
114
|
+
-- @param tbl table: the package matching table: keys should be item names
|
|
115
|
+
-- and values arrays of strings with packages names in "name/version" format.
|
|
116
|
+
local function store_package_items(itemsfn, pkg, version, tbl)
|
|
117
|
+
assert(type(itemsfn) == "function")
|
|
118
|
+
assert(type(pkg) == "string")
|
|
119
|
+
assert(type(version) == "string")
|
|
120
|
+
assert(type(tbl) == "table")
|
|
121
|
+
|
|
122
|
+
local pkg_version = pkg.."/"..version
|
|
123
|
+
local result = {}
|
|
124
|
+
|
|
125
|
+
for item, path in pairs(itemsfn(pkg, version)) do
|
|
126
|
+
result[item] = path
|
|
127
|
+
if not tbl[item] then
|
|
128
|
+
tbl[item] = {}
|
|
129
|
+
end
|
|
130
|
+
table.insert(tbl[item], pkg_version)
|
|
131
|
+
end
|
|
132
|
+
return result
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
--- Sort function for ordering rock identifiers in a manifest's
|
|
136
|
+
-- modules table. Rocks are ordered alphabetically by name, and then
|
|
137
|
+
-- by version which greater first.
|
|
138
|
+
-- @param a string: Version to compare.
|
|
139
|
+
-- @param b string: Version to compare.
|
|
140
|
+
-- @return boolean: The comparison result, according to the
|
|
141
|
+
-- rule outlined above.
|
|
142
|
+
local function sort_pkgs(a, b)
|
|
143
|
+
assert(type(a) == "string")
|
|
144
|
+
assert(type(b) == "string")
|
|
145
|
+
|
|
146
|
+
local na, va = a:match("(.*)/(.*)$")
|
|
147
|
+
local nb, vb = b:match("(.*)/(.*)$")
|
|
148
|
+
|
|
149
|
+
return (na == nb) and deps.compare_versions(va, vb) or na < nb
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
--- Sort items of a package matching table by version number (higher versions first).
|
|
153
|
+
-- @param tbl table: the package matching table: keys should be strings
|
|
154
|
+
-- and values arrays of strings with packages names in "name/version" format.
|
|
155
|
+
local function sort_package_matching_table(tbl)
|
|
156
|
+
assert(type(tbl) == "table")
|
|
157
|
+
|
|
158
|
+
if next(tbl) then
|
|
159
|
+
for item, pkgs in pairs(tbl) do
|
|
160
|
+
if #pkgs > 1 then
|
|
161
|
+
table.sort(pkgs, sort_pkgs)
|
|
162
|
+
-- Remove duplicates from the sorted array.
|
|
163
|
+
local prev = nil
|
|
164
|
+
local i = 1
|
|
165
|
+
while pkgs[i] do
|
|
166
|
+
local curr = pkgs[i]
|
|
167
|
+
if curr == prev then
|
|
168
|
+
table.remove(pkgs, i)
|
|
169
|
+
else
|
|
170
|
+
prev = curr
|
|
171
|
+
i = i + 1
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
--- Process the dependencies of a manifest table to determine its dependency
|
|
180
|
+
-- chains for loading modules. The manifest dependencies information is filled
|
|
181
|
+
-- and any dependency inconsistencies or missing dependencies are reported to
|
|
182
|
+
-- standard error.
|
|
183
|
+
-- @param manifest table: a manifest table.
|
|
184
|
+
local function update_dependencies(manifest)
|
|
185
|
+
for pkg, versions in pairs(manifest.repository) do
|
|
186
|
+
for version, repos in pairs(versions) do
|
|
187
|
+
local current = pkg.." "..version
|
|
188
|
+
for _, repo in ipairs(repos) do
|
|
189
|
+
if repo.arch == "installed" then
|
|
190
|
+
local missing
|
|
191
|
+
repo.dependencies, missing = deps.scan_deps({}, {}, manifest, pkg, version)
|
|
192
|
+
repo.dependencies[pkg] = nil
|
|
193
|
+
if missing then
|
|
194
|
+
for miss, err in pairs(missing) do
|
|
195
|
+
if miss == current then
|
|
196
|
+
util.printerr("Tree inconsistency detected: "..current.." has no rockspec. "..err)
|
|
197
|
+
else
|
|
198
|
+
util.printerr("Missing dependency for "..pkg.." "..version..": "..miss)
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
--- Store search results in a manifest table.
|
|
209
|
+
-- @param results table: The search results as returned by search.disk_search.
|
|
210
|
+
-- @param manifest table: A manifest table (must contain repository, modules, commands tables).
|
|
211
|
+
-- It will be altered to include the search results.
|
|
212
|
+
-- @return boolean or (nil, string): true in case of success, or nil followed by an error message.
|
|
213
|
+
local function store_results(results, manifest)
|
|
214
|
+
assert(type(results) == "table")
|
|
215
|
+
assert(type(manifest) == "table")
|
|
216
|
+
|
|
217
|
+
for name, versions in pairs(results) do
|
|
218
|
+
local pkgtable = manifest.repository[name] or {}
|
|
219
|
+
for version, entries in pairs(versions) do
|
|
220
|
+
local versiontable = {}
|
|
221
|
+
for _, entry in ipairs(entries) do
|
|
222
|
+
local entrytable = {}
|
|
223
|
+
entrytable.arch = entry.arch
|
|
224
|
+
if entry.arch == "installed" then
|
|
225
|
+
local rock_manifest = load_rock_manifest(name, version)
|
|
226
|
+
if not rock_manifest then
|
|
227
|
+
return nil, "rock_manifest file not found for "..name.." "..version.." - not a LuaRocks 2 tree?"
|
|
228
|
+
end
|
|
229
|
+
entrytable.modules = store_package_items(rep.package_modules, name, version, manifest.modules)
|
|
230
|
+
entrytable.commands = store_package_items(rep.package_commands, name, version, manifest.commands)
|
|
231
|
+
end
|
|
232
|
+
table.insert(versiontable, entrytable)
|
|
233
|
+
end
|
|
234
|
+
pkgtable[version] = versiontable
|
|
235
|
+
end
|
|
236
|
+
manifest.repository[name] = pkgtable
|
|
237
|
+
end
|
|
238
|
+
update_dependencies(manifest)
|
|
239
|
+
sort_package_matching_table(manifest.modules)
|
|
240
|
+
sort_package_matching_table(manifest.commands)
|
|
241
|
+
return true
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
--- Scan a LuaRocks repository and output a manifest file.
|
|
245
|
+
-- A file called 'manifest' will be written in the root of the given
|
|
246
|
+
-- repository directory.
|
|
247
|
+
-- @param repo A local repository directory.
|
|
248
|
+
-- @return boolean or (nil, string): True if manifest was generated,
|
|
249
|
+
-- or nil and an error message.
|
|
250
|
+
function make_manifest(repo)
|
|
251
|
+
assert(type(repo) == "string")
|
|
252
|
+
|
|
253
|
+
if not fs.is_dir(repo) then
|
|
254
|
+
return nil, "Cannot access repository at "..repo
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
local query = search.make_query("")
|
|
258
|
+
query.exact_name = false
|
|
259
|
+
query.arch = "any"
|
|
260
|
+
local results = search.disk_search(repo, query)
|
|
261
|
+
local manifest = { repository = {}, modules = {}, commands = {} }
|
|
262
|
+
manif_core.manifest_cache[repo] = manifest
|
|
263
|
+
|
|
264
|
+
local ok, err = store_results(results, manifest)
|
|
265
|
+
if not ok then return nil, err end
|
|
266
|
+
|
|
267
|
+
return save_table(repo, "manifest", manifest)
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
--- Load a manifest file from a local repository and add to the repository
|
|
271
|
+
-- information with regard to the given name and version.
|
|
272
|
+
-- A file called 'manifest' will be written in the root of the given
|
|
273
|
+
-- repository directory.
|
|
274
|
+
-- @param name string: Name of a package from the repository.
|
|
275
|
+
-- @param version string: Version of a package from the repository.
|
|
276
|
+
-- @param repo string or nil: Pathname of a local repository. If not given,
|
|
277
|
+
-- the default local repository configured as cfg.rocks_dir is used.
|
|
278
|
+
-- @return boolean or (nil, string): True if manifest was generated,
|
|
279
|
+
-- or nil and an error message.
|
|
280
|
+
function update_manifest(name, version, repo)
|
|
281
|
+
assert(type(name) == "string")
|
|
282
|
+
assert(type(version) == "string")
|
|
283
|
+
repo = path.rocks_dir(repo or cfg.root_dir)
|
|
284
|
+
|
|
285
|
+
util.printout("Updating manifest for "..repo)
|
|
286
|
+
|
|
287
|
+
local manifest, err = load_manifest(repo)
|
|
288
|
+
if not manifest then
|
|
289
|
+
util.printerr("No existing manifest. Attempting to rebuild...")
|
|
290
|
+
local ok, err = make_manifest(repo)
|
|
291
|
+
if not ok then
|
|
292
|
+
return nil, err
|
|
293
|
+
end
|
|
294
|
+
manifest, err = load_manifest(repo)
|
|
295
|
+
if not manifest then
|
|
296
|
+
return nil, err
|
|
297
|
+
end
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
local results = {[name] = {[version] = {{arch = "installed", repo = repo}}}}
|
|
301
|
+
|
|
302
|
+
local ok, err = store_results(results, manifest)
|
|
303
|
+
if not ok then return nil, err end
|
|
304
|
+
|
|
305
|
+
return save_table(repo, "manifest", manifest)
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
local function find_providers(file, root)
|
|
309
|
+
assert(type(file) == "string")
|
|
310
|
+
root = root or cfg.root_dir
|
|
311
|
+
|
|
312
|
+
local manifest, err = manif_core.load_local_manifest(path.rocks_dir(root))
|
|
313
|
+
if not manifest then
|
|
314
|
+
return nil, err .. " -- corrupted local rocks tree?"
|
|
315
|
+
end
|
|
316
|
+
local deploy_bin = path.deploy_bin_dir(root)
|
|
317
|
+
local deploy_lua = path.deploy_lua_dir(root)
|
|
318
|
+
local deploy_lib = path.deploy_lib_dir(root)
|
|
319
|
+
local key, manifest_tbl
|
|
320
|
+
|
|
321
|
+
if util.starts_with(file, deploy_lua) then
|
|
322
|
+
manifest_tbl = manifest.modules
|
|
323
|
+
key = path.path_to_module(file:sub(#deploy_lua+1):gsub("\\", "/"))
|
|
324
|
+
elseif util.starts_with(file, deploy_lib) then
|
|
325
|
+
manifest_tbl = manifest.modules
|
|
326
|
+
key = path.path_to_module(file:sub(#deploy_lib+1):gsub("\\", "/"))
|
|
327
|
+
elseif util.starts_with(file, deploy_bin) then
|
|
328
|
+
manifest_tbl = manifest.commands
|
|
329
|
+
key = file:sub(#deploy_bin+1):gsub("^[\\/]*", "")
|
|
330
|
+
else
|
|
331
|
+
assert(false, "Assertion failed: '"..file.."' is not a deployed file.")
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
local providers = manifest_tbl[key]
|
|
335
|
+
if not providers then
|
|
336
|
+
return nil, "untracked"
|
|
337
|
+
end
|
|
338
|
+
return providers
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
--- Given a path of a deployed file, figure out which rock name and version
|
|
342
|
+
-- correspond to it in the tree manifest.
|
|
343
|
+
-- @param file string: The full path of a deployed file.
|
|
344
|
+
-- @param root string or nil: A local root dir for a rocks tree. If not given, the default is used.
|
|
345
|
+
-- @return string, string: name and version of the provider rock.
|
|
346
|
+
function find_current_provider(file, root)
|
|
347
|
+
local providers, err = find_providers(file, root)
|
|
348
|
+
if not providers then return nil, err end
|
|
349
|
+
return providers[1]:match("([^/]*)/([^/]*)")
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
function find_next_provider(file, root)
|
|
353
|
+
local providers, err = find_providers(file, root)
|
|
354
|
+
if not providers then return nil, err end
|
|
355
|
+
if providers[2] then
|
|
356
|
+
return providers[2]:match("([^/]*)/([^/]*)")
|
|
357
|
+
else
|
|
358
|
+
return nil
|
|
359
|
+
end
|
|
360
|
+
end
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
|
|
2
|
+
--- Core functions for querying manifest files.
|
|
3
|
+
-- This module requires no specific 'fs' functionality.
|
|
4
|
+
module("luarocks.manif_core", package.seeall)
|
|
5
|
+
|
|
6
|
+
local persist = require("luarocks.persist")
|
|
7
|
+
local type_check = require("luarocks.type_check")
|
|
8
|
+
local dir = require("luarocks.dir")
|
|
9
|
+
local util = require("luarocks.util")
|
|
10
|
+
local cfg = require("luarocks.cfg")
|
|
11
|
+
|
|
12
|
+
manifest_cache = {}
|
|
13
|
+
|
|
14
|
+
--- Back-end function that actually loads the manifest
|
|
15
|
+
-- and stores it in the manifest cache.
|
|
16
|
+
-- @param file string: The local filename of the manifest file.
|
|
17
|
+
-- @param repo_url string: The repository identifier.
|
|
18
|
+
-- @param quick boolean: If given, skips type checking.
|
|
19
|
+
function manifest_loader(file, repo_url, quick)
|
|
20
|
+
local manifest, err = persist.load_into_table(file)
|
|
21
|
+
if not manifest then
|
|
22
|
+
return nil, "Failed loading manifest for "..repo_url..": "..err
|
|
23
|
+
end
|
|
24
|
+
if not quick then
|
|
25
|
+
local ok, err = type_check.type_check_manifest(manifest)
|
|
26
|
+
if not ok then
|
|
27
|
+
return nil, "Error checking manifest: "..err
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
manifest_cache[repo_url] = manifest
|
|
32
|
+
return manifest
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
--- Load a local manifest describing a repository.
|
|
36
|
+
-- All functions that use manifest tables assume they were obtained
|
|
37
|
+
-- through either this function or load_manifest.
|
|
38
|
+
-- @param repo_url string: URL or pathname for the repository.
|
|
39
|
+
-- @return table or (nil, string): A table representing the manifest,
|
|
40
|
+
-- or nil followed by an error message.
|
|
41
|
+
function load_local_manifest(repo_url)
|
|
42
|
+
assert(type(repo_url) == "string")
|
|
43
|
+
|
|
44
|
+
if manifest_cache[repo_url] then
|
|
45
|
+
return manifest_cache[repo_url]
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
local pathname = dir.path(repo_url, "manifest")
|
|
49
|
+
|
|
50
|
+
return manifest_loader(pathname, repo_url, true)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
--- Get all versions of a package listed in a manifest file.
|
|
54
|
+
-- @param name string: a package name.
|
|
55
|
+
-- @param manifest table or nil: a manifest table; if not given, the
|
|
56
|
+
-- default local manifest table is used.
|
|
57
|
+
-- @return table: An array of strings listing installed
|
|
58
|
+
-- versions of a package.
|
|
59
|
+
function get_versions(name, manifest)
|
|
60
|
+
assert(type(name) == "string")
|
|
61
|
+
assert(type(manifest) == "table" or not manifest)
|
|
62
|
+
|
|
63
|
+
if not manifest then
|
|
64
|
+
manifest = load_local_manifest(cfg.rocks_dir)
|
|
65
|
+
if not manifest then
|
|
66
|
+
return {}
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
local item = manifest.repository[name]
|
|
71
|
+
if item then
|
|
72
|
+
return util.keys(item)
|
|
73
|
+
end
|
|
74
|
+
return {}
|
|
75
|
+
end
|