rufus-lua-win 5.1.5
Sign up to get free protection for your applications and to get access to all the features.
- 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,173 @@
|
|
1
|
+
|
2
|
+
--- Utility module for loading files into tables and
|
3
|
+
-- saving tables into files.
|
4
|
+
-- Implemented separately to avoid interdependencies,
|
5
|
+
-- as it is used in the bootstrapping stage of the cfg module.
|
6
|
+
module("luarocks.persist", package.seeall)
|
7
|
+
|
8
|
+
local util = require("luarocks.util")
|
9
|
+
|
10
|
+
--- Load a Lua file containing assignments, storing them in a table.
|
11
|
+
-- The global environment is not propagated to the loaded file.
|
12
|
+
-- @param filename string: the name of the file.
|
13
|
+
-- @param tbl table or nil: if given, this table is used to store
|
14
|
+
-- loaded values.
|
15
|
+
-- @return table or (nil, string): a table with the file's assignments
|
16
|
+
-- as fields, or nil and a message in case of errors.
|
17
|
+
function load_into_table(filename, tbl)
|
18
|
+
assert(type(filename) == "string")
|
19
|
+
assert(type(tbl) == "table" or not tbl)
|
20
|
+
|
21
|
+
local result, chunk, ran, err
|
22
|
+
local result = tbl or {}
|
23
|
+
if setfenv then -- Lua 5.1
|
24
|
+
chunk, err = loadfile(filename)
|
25
|
+
if chunk then
|
26
|
+
setfenv(chunk, result)
|
27
|
+
ran, err = pcall(chunk)
|
28
|
+
end
|
29
|
+
else -- Lua 5.2
|
30
|
+
chunk, err = loadfile(filename, "t", result)
|
31
|
+
if chunk then
|
32
|
+
ran, err = pcall(chunk)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
if not chunk then
|
37
|
+
if err:sub(1,5) ~= filename:sub(1,5) then
|
38
|
+
return false, err
|
39
|
+
end
|
40
|
+
return nil, "Error loading file: "..err
|
41
|
+
end
|
42
|
+
if not ran then
|
43
|
+
return nil, "Error running file: "..err
|
44
|
+
end
|
45
|
+
return result
|
46
|
+
end
|
47
|
+
|
48
|
+
local write_table
|
49
|
+
|
50
|
+
--- Write a value as Lua code, invoking write_table.
|
51
|
+
-- This function handles only numbers, strings and tables
|
52
|
+
-- are keys (tables are handled recursively).
|
53
|
+
-- @param out userdata: a file object, open for writing.
|
54
|
+
-- @param v: the value to be written.
|
55
|
+
-- @param level number: the indentation level
|
56
|
+
-- @param sub_order table: optional prioritization table
|
57
|
+
-- @see write_table
|
58
|
+
local function write_value(out, v, level, sub_order)
|
59
|
+
if type(v) == "table" then
|
60
|
+
write_table(out, v, level + 1, sub_order)
|
61
|
+
elseif type(v) == "string" then
|
62
|
+
if v:match("\n") then
|
63
|
+
local open, close = "[[", "]]"
|
64
|
+
local equals = 0
|
65
|
+
while v:find(open,1,true) or v:find(close,1,true) do
|
66
|
+
equals = equals + 1
|
67
|
+
local eqs = ("="):rep(equals)
|
68
|
+
open, close = "["..eqs.."[", "]"..eqs.."]"
|
69
|
+
end
|
70
|
+
out:write(open.."\n"..v..close)
|
71
|
+
else
|
72
|
+
out:write("\""..v:gsub("\"", "\\\"").."\"")
|
73
|
+
end
|
74
|
+
else
|
75
|
+
out:write(tostring(v))
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
--- Write a table as Lua code representing a table to disk
|
80
|
+
-- (that is, in curly brackets notation).
|
81
|
+
-- This function handles only numbers, strings and tables
|
82
|
+
-- are keys (tables are handled recursively).
|
83
|
+
-- @param out userdata: a file object, open for writing.
|
84
|
+
-- @param tbl table: the table to be written.
|
85
|
+
-- @param level number: the indentation level
|
86
|
+
-- @param field_order table: optional prioritization table
|
87
|
+
write_table = function(out, tbl, level, field_order)
|
88
|
+
out:write("{")
|
89
|
+
local sep = "\n"
|
90
|
+
local indentation = " "
|
91
|
+
local indent = true
|
92
|
+
local i = 1
|
93
|
+
for k, v, sub_order in util.sortedpairs(tbl, field_order) do
|
94
|
+
out:write(sep)
|
95
|
+
if indent then
|
96
|
+
for n = 1,level do out:write(indentation) end
|
97
|
+
end
|
98
|
+
sep = ",\n"
|
99
|
+
indent = true
|
100
|
+
if type(k) == "number" then
|
101
|
+
if k ~= i then
|
102
|
+
out:write("["..tostring(k).."]=")
|
103
|
+
else
|
104
|
+
i = i + 1
|
105
|
+
end
|
106
|
+
indent = false
|
107
|
+
sep = ", "
|
108
|
+
elseif type(k) == "table" then
|
109
|
+
out:write("[")
|
110
|
+
write_table(out, k, level + 1)
|
111
|
+
out:write("] = ")
|
112
|
+
else
|
113
|
+
if k:match("^[a-zA-Z_][a-zA-Z0-9_]*$") then
|
114
|
+
out:write(k.." = ")
|
115
|
+
else
|
116
|
+
out:write("['"..k:gsub("'", "\\'").."'] = ")
|
117
|
+
end
|
118
|
+
end
|
119
|
+
write_value(out, v, level, sub_order)
|
120
|
+
end
|
121
|
+
if sep ~= "\n" then
|
122
|
+
out:write("\n")
|
123
|
+
for n = 1,level-1 do out:write(indentation) end
|
124
|
+
end
|
125
|
+
out:write("}")
|
126
|
+
end
|
127
|
+
|
128
|
+
--- Writes a table to an io-like object.
|
129
|
+
-- @param out userdata: a file object, open for writing.
|
130
|
+
-- @param tbl table: the table to be written.
|
131
|
+
-- @param field_order table: optional prioritization table
|
132
|
+
-- @return userdata The file object originally passed in as the `out` parameter.
|
133
|
+
local function write_table(out, tbl, field_order)
|
134
|
+
for k, v, sub_order in util.sortedpairs(tbl, field_order) do
|
135
|
+
out:write(k.." = ")
|
136
|
+
write_value(out, v, 0, sub_order)
|
137
|
+
out:write("\n")
|
138
|
+
end
|
139
|
+
return out
|
140
|
+
end
|
141
|
+
|
142
|
+
--- Save the contents of a table to a string.
|
143
|
+
-- Each element of the table is saved as a global assignment.
|
144
|
+
-- Only numbers, strings and tables (containing numbers, strings
|
145
|
+
-- or other recursively processed tables) are supported.
|
146
|
+
-- @param tbl table: the table containing the data to be written
|
147
|
+
-- @param field_order table: an optional array indicating the order of top-level fields.
|
148
|
+
-- @return string
|
149
|
+
function save_from_table_to_string(tbl, field_order)
|
150
|
+
local out = {buffer = {}}
|
151
|
+
function out:write(data) table.insert(self.buffer, data) end
|
152
|
+
write_table(out, tbl, field_order)
|
153
|
+
return table.concat(out.buffer)
|
154
|
+
end
|
155
|
+
|
156
|
+
--- Save the contents of a table in a file.
|
157
|
+
-- Each element of the table is saved as a global assignment.
|
158
|
+
-- Only numbers, strings and tables (containing numbers, strings
|
159
|
+
-- or other recursively processed tables) are supported.
|
160
|
+
-- @param filename string: the output filename
|
161
|
+
-- @param tbl table: the table containing the data to be written
|
162
|
+
-- @param field_order table: an optional array indicating the order of top-level fields.
|
163
|
+
-- @return boolean or (nil, string): true if successful, or nil and a
|
164
|
+
-- message in case of errors.
|
165
|
+
function save_from_table(filename, tbl, field_order)
|
166
|
+
local out = io.open(filename, "w")
|
167
|
+
if not out then
|
168
|
+
return nil, "Cannot create file at "..filename
|
169
|
+
end
|
170
|
+
write_table(out, tbl, field_order)
|
171
|
+
out:close()
|
172
|
+
return true
|
173
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
|
2
|
+
--- Module implementing the luarocks-admin "refresh_cache" command.
|
3
|
+
module("luarocks.refresh_cache", package.seeall)
|
4
|
+
|
5
|
+
local util = require("luarocks.util")
|
6
|
+
local cfg = require("luarocks.cfg")
|
7
|
+
local cache = require("luarocks.cache")
|
8
|
+
|
9
|
+
help_summary = "Refresh local cache of a remote rocks server."
|
10
|
+
help_arguments = "[--from=<server>]"
|
11
|
+
help = [[
|
12
|
+
The flag --from indicates which server to use.
|
13
|
+
If not given, the default server set in the upload_server variable
|
14
|
+
from the configuration file is used instead.
|
15
|
+
]]
|
16
|
+
|
17
|
+
function run(...)
|
18
|
+
local flags = util.parse_flags(...)
|
19
|
+
local server, upload_server = cache.get_upload_server(flags["server"])
|
20
|
+
if not server then return nil, upload_server end
|
21
|
+
local download_url = cache.get_server_urls(server, upload_server)
|
22
|
+
|
23
|
+
local ok, err = cache.refresh_local_cache(server, download_url, cfg.upload_user, cfg.upload_password)
|
24
|
+
if not ok then
|
25
|
+
return nil, err
|
26
|
+
else
|
27
|
+
return true
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
@@ -0,0 +1,135 @@
|
|
1
|
+
|
2
|
+
--- Module implementing the LuaRocks "remove" command.
|
3
|
+
-- Uninstalls rocks.
|
4
|
+
module("luarocks.remove", package.seeall)
|
5
|
+
|
6
|
+
local search = require("luarocks.search")
|
7
|
+
local deps = require("luarocks.deps")
|
8
|
+
local fetch = require("luarocks.fetch")
|
9
|
+
local rep = require("luarocks.rep")
|
10
|
+
local path = require("luarocks.path")
|
11
|
+
local util = require("luarocks.util")
|
12
|
+
local cfg = require("luarocks.cfg")
|
13
|
+
local manif = require("luarocks.manif")
|
14
|
+
local fs = require("luarocks.fs")
|
15
|
+
|
16
|
+
help_summary = "Uninstall a rock."
|
17
|
+
help_arguments = "[--force] <name> [<version>]"
|
18
|
+
help = [[
|
19
|
+
Argument is the name of a rock to be uninstalled.
|
20
|
+
If a version is not given, try to remove all versions at once.
|
21
|
+
Will only perform the removal if it does not break dependencies.
|
22
|
+
To override this check and force the removal, use --force.
|
23
|
+
]]
|
24
|
+
|
25
|
+
--- Obtain a list of packages that depend on the given set of packages
|
26
|
+
-- (where all packages of the set are versions of one program).
|
27
|
+
-- @param name string: the name of a program
|
28
|
+
-- @param versions array of string: the versions to be deleted.
|
29
|
+
-- @return array of string: an empty table if no packages depend on any
|
30
|
+
-- of the given list, or an array of strings in "name/version" format.
|
31
|
+
local function check_dependents(name, versions)
|
32
|
+
local dependents = {}
|
33
|
+
local blacklist = {}
|
34
|
+
blacklist[name] = {}
|
35
|
+
for version, _ in pairs(versions) do
|
36
|
+
blacklist[name][version] = true
|
37
|
+
end
|
38
|
+
local local_rocks = {}
|
39
|
+
local query_all = search.make_query("")
|
40
|
+
query_all.exact_name = false
|
41
|
+
search.manifest_search(local_rocks, cfg.rocks_dir, query_all)
|
42
|
+
local_rocks[name] = nil
|
43
|
+
for rock_name, rock_versions in pairs(local_rocks) do
|
44
|
+
for rock_version, _ in pairs(rock_versions) do
|
45
|
+
local rockspec, err = fetch.load_rockspec(path.rockspec_file(rock_name, rock_version))
|
46
|
+
if rockspec then
|
47
|
+
local _, missing = deps.match_deps(rockspec, blacklist)
|
48
|
+
if missing[name] then
|
49
|
+
table.insert(dependents, { name = rock_name, version = rock_version })
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
return dependents
|
55
|
+
end
|
56
|
+
|
57
|
+
--- Delete given versions of a program.
|
58
|
+
-- @param name string: the name of a program
|
59
|
+
-- @param versions array of string: the versions to be deleted.
|
60
|
+
-- @return boolean or (nil, string): true on success or nil and an error message.
|
61
|
+
local function delete_versions(name, versions)
|
62
|
+
|
63
|
+
for version, _ in pairs(versions) do
|
64
|
+
util.printout("Removing "..name.." "..version.."...")
|
65
|
+
local ok, err = rep.delete_version(name, version)
|
66
|
+
if not ok then return nil, err end
|
67
|
+
end
|
68
|
+
|
69
|
+
return true
|
70
|
+
end
|
71
|
+
|
72
|
+
--- Driver function for the "remove" command.
|
73
|
+
-- @param name string: name of a rock. If a version is given, refer to
|
74
|
+
-- a specific version; otherwise, try to remove all versions.
|
75
|
+
-- @param version string: When passing a package name, a version number
|
76
|
+
-- may also be given.
|
77
|
+
-- @return boolean or (nil, string): True if removal was
|
78
|
+
-- successful, nil and an error message otherwise.
|
79
|
+
function run(...)
|
80
|
+
local flags, name, version = util.parse_flags(...)
|
81
|
+
|
82
|
+
if type(name) ~= "string" then
|
83
|
+
return nil, "Argument missing, see help."
|
84
|
+
end
|
85
|
+
|
86
|
+
local ok, err = fs.check_command_permissions(flags)
|
87
|
+
if not ok then return nil, err end
|
88
|
+
|
89
|
+
local results = {}
|
90
|
+
search.manifest_search(results, cfg.rocks_dir, search.make_query(name, version))
|
91
|
+
|
92
|
+
local versions = results[name]
|
93
|
+
if not versions then
|
94
|
+
return nil, "Could not find rock '"..name..(version and " "..version or "").."' in local tree."
|
95
|
+
else
|
96
|
+
local version = next(versions)
|
97
|
+
local second = next(versions, version)
|
98
|
+
|
99
|
+
util.printout("Checking stability of dependencies on the absence of")
|
100
|
+
util.printout(name.." "..table.concat(util.keys(versions), ", ").."...")
|
101
|
+
util.printout()
|
102
|
+
|
103
|
+
local dependents = check_dependents(name, versions)
|
104
|
+
|
105
|
+
if #dependents == 0 or flags["force"] then
|
106
|
+
if #dependents > 0 then
|
107
|
+
util.printerr("The following packages may be broken by this forced removal:")
|
108
|
+
for _, dependent in ipairs(dependents) do
|
109
|
+
util.printerr(dependent.name.." "..dependent.version)
|
110
|
+
end
|
111
|
+
util.printerr()
|
112
|
+
end
|
113
|
+
local ok, err = delete_versions(name, versions)
|
114
|
+
if not ok then return nil, err end
|
115
|
+
ok, err = manif.make_manifest(cfg.rocks_dir)
|
116
|
+
if not ok then return nil, err end
|
117
|
+
else
|
118
|
+
if not second then
|
119
|
+
util.printerr("Will not remove "..name.." "..version..".")
|
120
|
+
util.printerr("Removing it would break dependencies for: ")
|
121
|
+
else
|
122
|
+
util.printerr("Will not remove all versions of "..name..".")
|
123
|
+
util.printerr("Removing them would break dependencies for: ")
|
124
|
+
end
|
125
|
+
for _, dependent in ipairs(dependents) do
|
126
|
+
util.printerr(dependent.name.." "..dependent.version)
|
127
|
+
end
|
128
|
+
util.printerr()
|
129
|
+
util.printerr("Use --force to force removal (warning: this may break modules).")
|
130
|
+
return nil, "Failed removing."
|
131
|
+
end
|
132
|
+
end
|
133
|
+
util.printout("Removal successful.")
|
134
|
+
return true
|
135
|
+
end
|
@@ -0,0 +1,313 @@
|
|
1
|
+
|
2
|
+
--- Functions for managing the repository on disk.
|
3
|
+
module("luarocks.rep", package.seeall)
|
4
|
+
|
5
|
+
local fs = require("luarocks.fs")
|
6
|
+
local path = require("luarocks.path")
|
7
|
+
local cfg = require("luarocks.cfg")
|
8
|
+
local util = require("luarocks.util")
|
9
|
+
local dir = require("luarocks.dir")
|
10
|
+
local manif = require("luarocks.manif")
|
11
|
+
local deps = require("luarocks.deps")
|
12
|
+
|
13
|
+
--- Get all installed versions of a package.
|
14
|
+
-- @param name string: a package name.
|
15
|
+
-- @return table or nil: An array of strings listing installed
|
16
|
+
-- versions of a package, or nil if none is available.
|
17
|
+
function get_versions(name)
|
18
|
+
assert(type(name) == "string")
|
19
|
+
|
20
|
+
local dirs = fs.list_dir(path.versions_dir(name))
|
21
|
+
return (dirs and #dirs > 0) and dirs or nil
|
22
|
+
end
|
23
|
+
|
24
|
+
--- Check if a package exists in a local repository.
|
25
|
+
-- Version numbers are compared as exact string comparison.
|
26
|
+
-- @param name string: name of package
|
27
|
+
-- @param version string: package version in string format
|
28
|
+
-- @return boolean: true if a package is installed,
|
29
|
+
-- false otherwise.
|
30
|
+
function is_installed(name, version)
|
31
|
+
assert(type(name) == "string")
|
32
|
+
assert(type(version) == "string")
|
33
|
+
|
34
|
+
return fs.is_dir(path.install_dir(name, version))
|
35
|
+
end
|
36
|
+
|
37
|
+
local function recurse_rock_manifest_tree(file_tree, action)
|
38
|
+
assert(type(file_tree) == "table")
|
39
|
+
assert(type(action) == "function")
|
40
|
+
local function do_recurse_rock_manifest_tree(tree, parent_path, parent_module)
|
41
|
+
|
42
|
+
for file, sub in pairs(tree) do
|
43
|
+
if type(sub) == "table" then
|
44
|
+
local ok, err = do_recurse_rock_manifest_tree(sub, parent_path..file.."/", parent_module..file..".")
|
45
|
+
if not ok then return nil, err end
|
46
|
+
else
|
47
|
+
local ok, err = action(parent_path, parent_module, file)
|
48
|
+
if not ok then return nil, err end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
return true
|
52
|
+
end
|
53
|
+
return do_recurse_rock_manifest_tree(file_tree, "", "")
|
54
|
+
end
|
55
|
+
|
56
|
+
local function store_package_data(result, name, sub, prefix)
|
57
|
+
assert(type(result) == "table")
|
58
|
+
assert(type(name) == "string")
|
59
|
+
assert(type(sub) == "table" or type(sub) == "string")
|
60
|
+
assert(type(prefix) == "string")
|
61
|
+
|
62
|
+
if type(sub) == "table" then
|
63
|
+
for sname, ssub in pairs(sub) do
|
64
|
+
store_package_data(result, sname, ssub, prefix..name.."/")
|
65
|
+
end
|
66
|
+
elseif type(sub) == "string" then
|
67
|
+
local pathname = prefix..name
|
68
|
+
result[path.path_to_module(pathname)] = pathname
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
local function store_package_data(result, name, file_tree)
|
73
|
+
if not file_tree then return end
|
74
|
+
return recurse_rock_manifest_tree(file_tree,
|
75
|
+
function(parent_path, parent_module, file)
|
76
|
+
local pathname = parent_path..file
|
77
|
+
result[path.path_to_module(pathname)] = pathname
|
78
|
+
return true
|
79
|
+
end
|
80
|
+
)
|
81
|
+
end
|
82
|
+
|
83
|
+
--- Obtain a list of modules within an installed package.
|
84
|
+
-- @param package string: The package name; for example "luasocket"
|
85
|
+
-- @param version string: The exact version number including revision;
|
86
|
+
-- for example "2.0.1-1".
|
87
|
+
-- @return table: A table of modules where keys are module identifiers
|
88
|
+
-- in "foo.bar" format and values are pathnames in architecture-dependent
|
89
|
+
-- "foo/bar.so" format. If no modules are found or if package or version
|
90
|
+
-- are invalid, an empty table is returned.
|
91
|
+
function package_modules(package, version)
|
92
|
+
assert(type(package) == "string")
|
93
|
+
assert(type(version) == "string")
|
94
|
+
|
95
|
+
local result = {}
|
96
|
+
local rock_manifest = manif.load_rock_manifest(package, version)
|
97
|
+
store_package_data(result, package, rock_manifest.lib)
|
98
|
+
store_package_data(result, package, rock_manifest.lua)
|
99
|
+
return result
|
100
|
+
end
|
101
|
+
|
102
|
+
--- Obtain a list of command-line scripts within an installed package.
|
103
|
+
-- @param package string: The package name; for example "luasocket"
|
104
|
+
-- @param version string: The exact version number including revision;
|
105
|
+
-- for example "2.0.1-1".
|
106
|
+
-- @return table: A table of items where keys are command names
|
107
|
+
-- as strings and values are pathnames in architecture-dependent
|
108
|
+
-- ".../bin/foo" format. If no modules are found or if package or version
|
109
|
+
-- are invalid, an empty table is returned.
|
110
|
+
function package_commands(package, version)
|
111
|
+
assert(type(package) == "string")
|
112
|
+
assert(type(version) == "string")
|
113
|
+
|
114
|
+
local result = {}
|
115
|
+
local rock_manifest = manif.load_rock_manifest(package, version)
|
116
|
+
store_package_data(result, package, rock_manifest.bin)
|
117
|
+
return result
|
118
|
+
end
|
119
|
+
|
120
|
+
|
121
|
+
--- Check if a rock contains binary executables.
|
122
|
+
-- @param name string: name of an installed rock
|
123
|
+
-- @param version string: version of an installed rock
|
124
|
+
-- @return boolean: returns true if rock contains platform-specific
|
125
|
+
-- binary executables, or false if it is a pure-Lua rock.
|
126
|
+
function has_binaries(name, version)
|
127
|
+
assert(type(name) == "string")
|
128
|
+
assert(type(version) == "string")
|
129
|
+
|
130
|
+
local rock_manifest = manif.load_rock_manifest(name, version)
|
131
|
+
if rock_manifest.bin then
|
132
|
+
for name, md5 in pairs(rock_manifest.bin) do
|
133
|
+
-- TODO verify that it is the same file. If it isn't, find the actual command.
|
134
|
+
if fs.is_actual_binary(dir.path(cfg.deploy_bin_dir, name)) then
|
135
|
+
return true
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|
139
|
+
return false
|
140
|
+
end
|
141
|
+
|
142
|
+
function run_hook(rockspec, hook_name)
|
143
|
+
assert(type(rockspec) == "table")
|
144
|
+
assert(type(hook_name) == "string")
|
145
|
+
|
146
|
+
local hooks = rockspec.hooks
|
147
|
+
if not hooks then
|
148
|
+
return true
|
149
|
+
end
|
150
|
+
if not hooks.substituted_variables then
|
151
|
+
util.variable_substitutions(hooks, rockspec.variables)
|
152
|
+
hooks.substituted_variables = true
|
153
|
+
end
|
154
|
+
local hook = hooks[hook_name]
|
155
|
+
if hook then
|
156
|
+
util.printout(hook)
|
157
|
+
if not fs.execute(hook) then
|
158
|
+
return nil, "Failed running "..hook_name.." hook."
|
159
|
+
end
|
160
|
+
end
|
161
|
+
return true
|
162
|
+
end
|
163
|
+
|
164
|
+
local function install_binary(source, target)
|
165
|
+
assert(type(source) == "string")
|
166
|
+
assert(type(target) == "string")
|
167
|
+
|
168
|
+
local match = source:match("%.lua$")
|
169
|
+
local file, ok, err
|
170
|
+
if not match then
|
171
|
+
file = io.open(source)
|
172
|
+
end
|
173
|
+
if match or (file and file:read():match("^#!.*lua.*")) then
|
174
|
+
ok, err = fs.wrap_script(source, target)
|
175
|
+
else
|
176
|
+
ok, err = fs.copy_binary(source, target)
|
177
|
+
end
|
178
|
+
if file then file:close() end
|
179
|
+
return ok, err
|
180
|
+
end
|
181
|
+
|
182
|
+
local function resolve_conflict(target, deploy_dir, name, version)
|
183
|
+
local cname, cversion = manif.find_current_provider(target)
|
184
|
+
if not cname then
|
185
|
+
return nil, cversion
|
186
|
+
end
|
187
|
+
if name ~= cname or deps.compare_versions(version, cversion) then
|
188
|
+
local versioned = path.versioned_name(target, deploy_dir, cname, cversion)
|
189
|
+
fs.make_dir(dir.dir_name(versioned))
|
190
|
+
fs.move(target, versioned)
|
191
|
+
return target
|
192
|
+
else
|
193
|
+
return path.versioned_name(target, deploy_dir, name, version)
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
function should_wrap_bin_scripts(rockspec)
|
198
|
+
assert(type(rockspec) == "table")
|
199
|
+
|
200
|
+
if cfg.wrap_bin_scripts ~= nil then
|
201
|
+
return cfg.wrap_bin_scripts
|
202
|
+
end
|
203
|
+
if rockspec.deploy and rockspec.deploy.wrap_bin_scripts == false then
|
204
|
+
return false
|
205
|
+
end
|
206
|
+
return true
|
207
|
+
end
|
208
|
+
|
209
|
+
function deploy_files(name, version, wrap_bin_scripts)
|
210
|
+
assert(type(name) == "string")
|
211
|
+
assert(type(version) == "string")
|
212
|
+
assert(type(wrap_bin_scripts) == "boolean")
|
213
|
+
|
214
|
+
local function deploy_file_tree(file_tree, source_dir, deploy_dir, move_fn)
|
215
|
+
if not move_fn then
|
216
|
+
move_fn = fs.move
|
217
|
+
end
|
218
|
+
return recurse_rock_manifest_tree(file_tree,
|
219
|
+
function(parent_path, parent_module, file)
|
220
|
+
local source = dir.path(source_dir, parent_path, file)
|
221
|
+
local target = dir.path(deploy_dir, parent_path, file)
|
222
|
+
local ok, err
|
223
|
+
if fs.exists(target) then
|
224
|
+
local new_target, err = resolve_conflict(target, deploy_dir, name, version)
|
225
|
+
if err == "untracked" then
|
226
|
+
fs.delete(target)
|
227
|
+
elseif err then
|
228
|
+
return nil, err.." Cannot install new version."
|
229
|
+
else
|
230
|
+
target = new_target
|
231
|
+
end
|
232
|
+
end
|
233
|
+
fs.make_dir(dir.dir_name(target))
|
234
|
+
ok, err = move_fn(source, target)
|
235
|
+
fs.remove_dir_tree_if_empty(dir.dir_name(source))
|
236
|
+
if not ok then return nil, err end
|
237
|
+
return true
|
238
|
+
end
|
239
|
+
)
|
240
|
+
end
|
241
|
+
|
242
|
+
local rock_manifest = manif.load_rock_manifest(name, version)
|
243
|
+
|
244
|
+
local ok, err = true
|
245
|
+
if rock_manifest.bin then
|
246
|
+
local move_bin_fn = wrap_bin_scripts and install_binary or fs.copy_binary
|
247
|
+
ok, err = deploy_file_tree(rock_manifest.bin, path.bin_dir(name, version), cfg.deploy_bin_dir, move_bin_fn)
|
248
|
+
end
|
249
|
+
if ok and rock_manifest.lua then
|
250
|
+
ok, err = deploy_file_tree(rock_manifest.lua, path.lua_dir(name, version), cfg.deploy_lua_dir)
|
251
|
+
end
|
252
|
+
if ok and rock_manifest.lib then
|
253
|
+
ok, err = deploy_file_tree(rock_manifest.lib, path.lib_dir(name, version), cfg.deploy_lib_dir)
|
254
|
+
end
|
255
|
+
return ok, err
|
256
|
+
end
|
257
|
+
|
258
|
+
--- Delete a package from the local repository.
|
259
|
+
-- Version numbers are compared as exact string comparison.
|
260
|
+
-- @param name string: name of package
|
261
|
+
-- @param version string: package version in string format
|
262
|
+
function delete_version(name, version)
|
263
|
+
assert(type(name) == "string")
|
264
|
+
assert(type(version) == "string")
|
265
|
+
|
266
|
+
local function delete_deployed_file_tree(file_tree, deploy_dir)
|
267
|
+
return recurse_rock_manifest_tree(file_tree,
|
268
|
+
function(parent_path, parent_module, file)
|
269
|
+
local target = dir.path(deploy_dir, parent_path, file)
|
270
|
+
local versioned = path.versioned_name(target, deploy_dir, name, version)
|
271
|
+
if fs.exists(versioned) then
|
272
|
+
local ok = fs.delete(versioned)
|
273
|
+
fs.remove_dir_tree_if_empty(dir.dir_name(versioned))
|
274
|
+
if not ok then return nil, "Failed deleting "..versioned end
|
275
|
+
else
|
276
|
+
local ok = fs.delete(target)
|
277
|
+
local next_name, next_version = manif.find_next_provider(target)
|
278
|
+
if next_name then
|
279
|
+
local versioned = path.versioned_name(target, deploy_dir, next_name, next_version)
|
280
|
+
fs.move(versioned, target)
|
281
|
+
fs.remove_dir_tree_if_empty(dir.dir_name(versioned))
|
282
|
+
end
|
283
|
+
fs.remove_dir_tree_if_empty(dir.dir_name(target))
|
284
|
+
if not ok then return nil, "Failed deleting "..target end
|
285
|
+
end
|
286
|
+
return true
|
287
|
+
end
|
288
|
+
)
|
289
|
+
end
|
290
|
+
|
291
|
+
local rock_manifest = manif.load_rock_manifest(name, version)
|
292
|
+
if not rock_manifest then
|
293
|
+
return nil, "rock_manifest file not found for "..name.." "..version.." - not a LuaRocks 2 tree?"
|
294
|
+
end
|
295
|
+
|
296
|
+
local ok, err = true
|
297
|
+
if rock_manifest.bin then
|
298
|
+
ok, err = delete_deployed_file_tree(rock_manifest.bin, cfg.deploy_bin_dir)
|
299
|
+
end
|
300
|
+
if ok and rock_manifest.lua then
|
301
|
+
ok, err = delete_deployed_file_tree(rock_manifest.lua, cfg.deploy_lua_dir)
|
302
|
+
end
|
303
|
+
if ok and rock_manifest.lib then
|
304
|
+
ok, err = delete_deployed_file_tree(rock_manifest.lib, cfg.deploy_lib_dir)
|
305
|
+
end
|
306
|
+
if err then return nil, err end
|
307
|
+
|
308
|
+
fs.delete(path.install_dir(name, version))
|
309
|
+
if not get_versions(name) then
|
310
|
+
fs.delete(dir.path(cfg.rocks_dir, name))
|
311
|
+
end
|
312
|
+
return true
|
313
|
+
end
|