summaryrefslogtreecommitdiffhomepage
path: root/bin
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-04-28 14:11:16 +0900
committerAdam Malczewski <[email protected]>2026-04-28 14:11:16 +0900
commit07277435c0688ad9f5fa682633b86b99ef5bb854 (patch)
tree3e650e97bcbd229f942330542a333dcad1844542 /bin
downloaddispatch-adapter-interface-07277435c0688ad9f5fa682633b86b99ef5bb854.tar.gz
dispatch-adapter-interface-07277435c0688ad9f5fa682633b86b99ef5bb854.zip
update
Diffstat (limited to 'bin')
-rwxr-xr-xbin/check32
-rwxr-xr-xbin/console11
-rwxr-xr-xbin/install23
-rwxr-xr-xbin/setup8
4 files changed, 74 insertions, 0 deletions
diff --git a/bin/check b/bin/check
new file mode 100755
index 0000000..ddcad0c
--- /dev/null
+++ b/bin/check
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+cd "$(dirname "$0")/.."
+
+RESULTS_FILE="test_results.txt"
+
+{
+ echo "============================================"
+ echo "dispatch-adapter-interface — $(date)"
+ echo "============================================"
+ echo ""
+
+ echo "--- bundle install ---"
+ bundle install 2>&1
+ echo ""
+
+ echo "--- rubocop --autocorrect-all ---"
+ bundle exec rubocop --autocorrect-all 2>&1 || true
+ echo ""
+
+ echo "--- rspec ---"
+ bundle exec rspec 2>&1 || true
+ echo ""
+
+ echo "============================================"
+ echo "Done."
+ echo "============================================"
+} | tee "$RESULTS_FILE"
+
+echo ""
+echo "Results written to $RESULTS_FILE"
diff --git a/bin/console b/bin/console
new file mode 100755
index 0000000..9d66b1c
--- /dev/null
+++ b/bin/console
@@ -0,0 +1,11 @@
+#!/usr/bin/env ruby
+# frozen_string_literal: true
+
+require "bundler/setup"
+require "dispatch/adapter/interface"
+
+# You can add fixtures and/or initialization code here to make experimenting
+# with your gem easier. You can also use a different console, if you like.
+
+require "irb"
+IRB.start(__FILE__)
diff --git a/bin/install b/bin/install
new file mode 100755
index 0000000..1132573
--- /dev/null
+++ b/bin/install
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+cd "$(dirname "$0")/.."
+
+GEM_NAME="dispatch-adapter-interface"
+
+echo "--- Building $GEM_NAME ---"
+gem build "$GEM_NAME.gemspec"
+
+GEM_FILE=$(ls -t "$GEM_NAME"-*.gem 2>/dev/null | head -1)
+
+if [ -z "$GEM_FILE" ]; then
+ echo "ERROR: No .gem file found after build."
+ exit 1
+fi
+
+echo ""
+echo "--- Installing $GEM_FILE ---"
+gem install "$GEM_FILE" --local
+
+echo ""
+echo "Done. $GEM_NAME installed."
diff --git a/bin/setup b/bin/setup
new file mode 100755
index 0000000..dce67d8
--- /dev/null
+++ b/bin/setup
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+set -euo pipefail
+IFS=$'\n\t'
+set -vx
+
+bundle install
+
+# Do any other automated setup that you need to do here