Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion httpsensible.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_dependency("httpx", "~> 0.24")
spec.add_dependency("httpx", ">= 0.24", "< 2.0")
spec.add_dependency("jwt", "~> 2.7")

spec.add_development_dependency("minitest", "~> 5.6")
Expand Down
7 changes: 7 additions & 0 deletions script/ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -e

export CI=true

script/test
26 changes: 26 additions & 0 deletions script/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
#/ Usage: script/test <filename:test_line>
#/ 1. `script/test FILE` runs all tests in the file.
#/ 1. `script/test FILE:LINE` runs test in specific line of the file.
#/ 1. `script/test 'GLOB'` runs all tests for matching glob.
#/ * make sure to wrap the `GLOB` in single quotes `''`.

if ! [ $# -eq 0 ]; then
export TEST=$(echo "$1" | cut -d ":" -f 1)

if [[ "$1" == *":"* ]]; then
LINE=$(echo "$1" | cut -d ":" -f 2)
LINE=$(head -n $LINE $TEST | tail -1)
NAME=$(echo "$LINE" | sed "s/.*def //")

if ! [[ "$NAME" == "test_"* ]]; then
echo
echo "ERROR: Line provided does not define a test case"
exit 1
fi

export TESTOPTS="--name=$NAME"
fi
fi

bundle exec rake test