scip-ruby 0.4.0-arm64-darwin-22

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.
Files changed (4) hide show
  1. checksums.yaml +7 -0
  2. data/bin/scip-ruby +75 -0
  3. data/native/scip-ruby +0 -0
  4. metadata +46 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: a19b331101c743933cb7d56c62fa10f934538a533705a334e6896e625de93b2c
4
+ data.tar.gz: 5b1467d7d695ffabafda46d04f9bcbd4090a2f0c9aaa6934853b487ced3ba919
5
+ SHA512:
6
+ metadata.gz: 0aa48c91684fa59deafeaea597bb3c4c2fff6d0d964e0591587910d2d0feb1bb80f830ca760c9fff9362418d6f20a2f1b5cbe1b63dcc67a07200458b92c9fcaa
7
+ data.tar.gz: d8dfdbd561afe0426774a11c4696db408d7c6b045f97834dd0872102456f3a6235f4432368360c1a7ce3e2039d240466d0a29aca77b7e54d684ace7240160734
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-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: []