scip-ruby-debug 0.4.0-arm64-darwin-23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/bin/scip-ruby +75 -0
- data/native/scip-ruby +0 -0
- metadata +46 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 53d57b9af622e00fb5eaf6708ac8d228ffb8cbf9ce956886dcae82ae11238445
|
4
|
+
data.tar.gz: 3e8f044abf76f0c671330d9413ee98f39e0fab85fed1853a8b166bb4a099c02b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 32ab08ffa237a2a8fb311094c77500673262fc7b189ff79a3602bfccfbe4be241385486fd793591cee1ea09de21499e4565a4849681e2a49fff14133e51c1578
|
7
|
+
data.tar.gz: 5b5e4a7944e2011759ed61c9bfd348775769716c8593228617ac46f3e8682b66585c6224ec565618d5b534c04c0250f829e2995c7f1de28976cb2b16333e07a1
|
data/bin/scip-ruby
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
#!/usr/bin/env ruby
|
3
|
+
|
4
|
+
=begin 2>/dev/null
|
5
|
+
|
6
|
+
# START Bash
|
7
|
+
|
8
|
+
# This is both a Ruby script and a Bash script similar to srb.
|
9
|
+
# Unlike srb, I'm mixing languages because it didn't seem terribly
|
10
|
+
# useful to spend time figuring out how to write this in Ruby.
|
11
|
+
#
|
12
|
+
# We don't care about perf here similar to srb; as you can see below,
|
13
|
+
# I'm spawning a bunch of processes. And that's OK, because we don't
|
14
|
+
# expect someone to keep invoking the indexer repeatedly (unlike say,
|
15
|
+
# the type-checker which may be invoked through something like entr).
|
16
|
+
|
17
|
+
set -euo pipefail
|
18
|
+
|
19
|
+
if [ -n "${DEBUG:-}" ]; then
|
20
|
+
set -x
|
21
|
+
fi
|
22
|
+
|
23
|
+
die() {
|
24
|
+
echo "Expected to be invoked as 'bundle exec scip-ruby'"
|
25
|
+
echo "Did you invoke this binary directly?"
|
26
|
+
exit 1
|
27
|
+
}
|
28
|
+
|
29
|
+
if [ -z "${BUNDLE_GEMFILE:-}" ]; then
|
30
|
+
echo "Missing BUNDLE_GEMFILE environment variable"
|
31
|
+
die
|
32
|
+
elif [ -z "${BUNDLE_BIN_PATH:-}" ]; then
|
33
|
+
echo "Missing BUNDLE_BIN_PATH environment variable"
|
34
|
+
die
|
35
|
+
fi
|
36
|
+
|
37
|
+
GEMFILE_CONTENTS="$(< "$BUNDLE_GEMFILE")"
|
38
|
+
if [ "$GEMFILE_CONTENTS" == *"scip-ruby-debug"* ]; then
|
39
|
+
SCIP_RUBY="scip-ruby-debug"
|
40
|
+
elif [ "$GEMFILE_CONTENTS" == *"scip-ruby"* ]; then
|
41
|
+
SCIP_RUBY="scip-ruby"
|
42
|
+
elif grep -q -e "scip-ruby-debug" "$(dirname "$BUNDLE_GEMFILE")"/*.gemspec; then
|
43
|
+
SCIP_RUBY="scip-ruby-debug"
|
44
|
+
else
|
45
|
+
SCIP_RUBY="scip-ruby"
|
46
|
+
fi
|
47
|
+
|
48
|
+
# Calling the bundle in BUNDLE_BIN_PATH tries to mess with system directories.
|
49
|
+
if [[ "$BUNDLE_BIN_PATH" =~ (.*)/lib/ruby/gems/.* ]]; then
|
50
|
+
BUNDLE_BIN_PATH="${BASH_REMATCH[1]}/bin/bundle"
|
51
|
+
file "$BUNDLE_BIN_PATH" > /dev/null || (echo "scip-ruby: warning: bundle not found at $BUNDLE_BIN_PATH, this may lead to errors")
|
52
|
+
else
|
53
|
+
echo "scip-ruby: warning: unexpected BUNDLE_BIN_PATH = $BUNDLE_BIN_PATH"
|
54
|
+
echo "scip-ruby: warning: this may lead to further errors"
|
55
|
+
fi
|
56
|
+
|
57
|
+
# Careful about trying to "optimize" the regex here.
|
58
|
+
# I tried to use -E but that doesn't match with BSD sed.
|
59
|
+
GEM_INSTALL_PATH="$("$BUNDLE_BIN_PATH" info "$SCIP_RUBY" | grep 'Path:' | sed -e 's/\s*Path://')"
|
60
|
+
# From https://stackoverflow.com/a/3352015/2682729
|
61
|
+
trim() {
|
62
|
+
local var="$*"
|
63
|
+
var="${var#"${var%%[![:space:]]*}"}"
|
64
|
+
var="${var%"${var##*[![:space:]]}"}"
|
65
|
+
printf '%s' "$var"
|
66
|
+
}
|
67
|
+
GEM_INSTALL_PATH="$(trim "$GEM_INSTALL_PATH")"
|
68
|
+
|
69
|
+
chmod +x "$GEM_INSTALL_PATH/native/scip-ruby"
|
70
|
+
exec "$GEM_INSTALL_PATH/native/scip-ruby" "$@"
|
71
|
+
|
72
|
+
# END Bash
|
73
|
+
=end
|
74
|
+
|
75
|
+
exec(__FILE__, *ARGV)
|
data/native/scip-ruby
ADDED
Binary file
|
metadata
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: scip-ruby-debug
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.4.0
|
5
|
+
platform: arm64-darwin-23
|
6
|
+
authors:
|
7
|
+
- Sourcegraph
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-07-09 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Wrapper for the scip-ruby binary
|
14
|
+
email: code-intel@sourcegraph.com
|
15
|
+
executables:
|
16
|
+
- scip-ruby
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- bin/scip-ruby
|
21
|
+
- native/scip-ruby
|
22
|
+
homepage: https://github.com/sourcegraph/scip-ruby
|
23
|
+
licenses:
|
24
|
+
- Apache-2.0
|
25
|
+
metadata:
|
26
|
+
source_code_uri: https://github.com/sourcegraph/scip-ruby
|
27
|
+
post_install_message:
|
28
|
+
rdoc_options: []
|
29
|
+
require_paths:
|
30
|
+
- lib
|
31
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - ">="
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: 2.3.0
|
36
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
requirements: []
|
42
|
+
rubygems_version: 3.3.7
|
43
|
+
signing_key:
|
44
|
+
specification_version: 4
|
45
|
+
summary: A SCIP indexer for Ruby
|
46
|
+
test_files: []
|