Skip to content

Commit f7e38cd

Browse files
committed
Cleanup to match best practices in ruby and shell
Cleanup both ruby and shell scripts to match various linters' suggestions. Mostly using the new hash syntax, as well as small readability changes. Additionally, update gitignore to not accidentally add in the output from running `rake vendor`
1 parent d8e66cc commit f7e38cd

9 files changed

Lines changed: 365 additions & 353 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ Gemfile.bak
44
.bundle
55
vendor
66
.idea
7+
lib/logstash-input-http_jars.rb
8+
build/
9+
.gradle/

ci/build.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
########################################################
88
set -e
99

10-
echo "Starting build process in: `pwd`"
10+
echo "Starting build process in: $(pwd)"
1111
source ./ci/setup.sh
1212

1313
if [[ -f "ci/run.sh" ]]; then
14-
echo "Running custom build script in: `pwd`/ci/run.sh"
15-
source ./ci/run.sh
14+
echo "Running custom build script in: $(pwd)/ci/run.sh"
15+
source ./ci/run.sh
1616
else
17-
echo "Running default build scripts in: `pwd`/ci/build.sh"
18-
bundle install
19-
bundle exec rake vendor
20-
bundle exec rspec spec
17+
echo "Running default build scripts in: $(pwd)/ci/build.sh"
18+
bundle install
19+
bundle exec rake vendor
20+
bundle exec rspec spec
2121
fi

ci/setup.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
set -e
99
if [ "$LOGSTASH_BRANCH" ]; then
1010
echo "Building plugin using Logstash source"
11-
BASE_DIR=`pwd`
11+
BASE_DIR=$(pwd)
1212
echo "Checking out branch: $LOGSTASH_BRANCH"
13-
git clone -b $LOGSTASH_BRANCH https://github.com/elastic/logstash.git ../../logstash --depth 1
13+
git clone -b "$LOGSTASH_BRANCH" https://github.com/elastic/logstash.git ../../logstash --depth 1
1414
printf "Checked out Logstash revision: %s\n" "$(git -C ../../logstash rev-parse HEAD)"
1515
cd ../../logstash
1616
echo "Building plugins with Logstash version:"
1717
cat versions.yml
1818
echo "---"
1919
# We need to build the jars for that specific version
20-
echo "Running gradle assemble in: `pwd`"
20+
echo "Running gradle assemble in: $(pwd)"
2121
./gradlew assemble
22-
cd $BASE_DIR
22+
cd "$BASE_DIR"
2323
export LOGSTASH_SOURCE=1
2424
else
2525
echo "Building plugin using released gems on rubygems"

gradlew

Lines changed: 75 additions & 75 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)