scip-ruby-debug 0.4.0-arm64-darwin-22
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: 5b20fa81d19615349681053ad513b3db565e04781f75e1d1b7a23be171158e58
|
4
|
+
data.tar.gz: f711b5a214aec2d0fdfb904e80f3d843bf7061750d57b22b128be3c233c24d8a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5219ba68da7ab0cf01ad1ee57ac913d50e6159d05af3a18c70993add5c4dd21742e573ea53d935d63c9713bfaeaabc0ce44869eb09208b80b5a7d33511a6b215
|
7
|
+
data.tar.gz: 37523a51570a48b18b25ea4ffca0698bbf76c3bd901c9fd9ac22032db19cf2bd170c4ba12eb7286cf68a9fb05f13933da65b78a96a1cdb8c34c89189237ba7a7
|
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-22
|
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: []
|