forked from kameeoze/jruby-poi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspec_debug.sh
More file actions
executable file
·32 lines (27 loc) · 1.1 KB
/
Copy pathspec_debug.sh
File metadata and controls
executable file
·32 lines (27 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh
#set -x
RUBY_DIR=$(dirname $(which ruby))/..
if [[ ${RUBY_DIR} == *1.6.* ]]
then
RUBYGEMS_DIR=${RUBY_DIR}/lib/ruby/gems/jruby/gems
else
RUBYGEMS_DIR=${RUBY_DIR}/lib/ruby/gems/1.8/gems
fi
GEM_COLUMNIZE=$(ls -1d $RUBYGEMS_DIR/columnize*/lib | head -1 | /usr/bin/ruby -e 'print File.expand_path($stdin.read)')
GEM_RUBY_DEBUG_BASE=$(ls -1d $RUBYGEMS_DIR/ruby-debug-base-*/lib | head -1 | /usr/bin/ruby -e 'print File.expand_path($stdin.read)')
GEM_RUBY_DEBUG_CLI=$(ls -1d $RUBYGEMS_DIR/ruby-debug-*/cli | head -1 | /usr/bin/ruby -e 'print File.expand_path($stdin.read)')
GEM_SOURCES=$(ls -1d $RUBYGEMS_DIR/sources-*/lib | head -1 | /usr/bin/ruby -e 'print File.expand_path($stdin.read)')
echo "RUBYGEMS_DIR: ${RUBYGEMS_DIR}"
echo "GEM_SOURCES: ${GEM_SOURCES}"
echo "GEM_COLUMNIZE: ${GEM_COLUMNIZE}"
echo "GEM_RUBY_DEBUG_CLI: ${GEM_RUBY_DEBUG_CLI}"
echo "GEM_RUBY_DEBUG_BASE: ${GEM_RUBY_DEBUG_BASE}"
runner="ruby --client \
-I${GEM_COLUMNIZE} \
-I${GEM_RUBY_DEBUG_BASE} \
-I${GEM_RUBY_DEBUG_CLI} \
-I${GEM_SOURCES} \
-rubygems -S"
cmd="bundle exec rdebug rspec -c $*"
#cmd="irb"
$runner $cmd