scip-ruby 0.4.0-arm64-darwin-23
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/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: 5c6818baa2bd7ef8e63dcdda60f344771773bfb0857ab20a6a03c8343335a0d2
|
4
|
+
data.tar.gz: 8cef50dce021da271ab277d76cf45042e0901ddbbdcc92699691b56415a57d47
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3b3577adff372eda2125d667f423057a6247779d4191d464db752ba38ffe945e60a767feeeefe2609e3db5547f9829da17e0391a8b44d3c3ed84cafe0ad8c28c
|
7
|
+
data.tar.gz: 796259eb61aaf948649f7c88c046a4119e4089fa00799929a43a35ecd61543ebd962f866c719eee0159944703ed3a627fff8cbfda037efc76b928f44c348cbfc
|
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
|
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: []
|