Skip to content

Commit eeda87a

Browse files
committed
bump & test scripts
1 parent fa71bef commit eeda87a

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

bump.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
if [ -z "$1" ]; then
6+
echo "Usage: ./bump.sh <new_version>"
7+
echo "Example: ./bump.sh 0.3.0"
8+
exit 1
9+
fi
10+
11+
NEW_VERSION=$1
12+
13+
echo "Bumping version to $NEW_VERSION..."
14+
15+
# Update config.json
16+
jq ".gemVersion = \"$NEW_VERSION\"" config.json > config.json.tmp && mv config.json.tmp config.json
17+
echo "✓ Updated config.json gemVersion to $NEW_VERSION"
18+
19+
# Update lib/fastcomments.rb
20+
sed -i "s/VERSION = '[^']*'/VERSION = '$NEW_VERSION'/" lib/fastcomments.rb
21+
echo "✓ Updated lib/fastcomments.rb VERSION to $NEW_VERSION"
22+
23+
echo "Done! Version bumped to $NEW_VERSION"

test.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
echo "Running FastComments Ruby SDK tests..."
6+
7+
# Check required environment variables
8+
if [ -z "$FASTCOMMENTS_API_KEY" ] || [ -z "$FASTCOMMENTS_TENANT_ID" ]; then
9+
echo "Error: FASTCOMMENTS_API_KEY and FASTCOMMENTS_TENANT_ID environment variables must be set"
10+
exit 1
11+
fi
12+
13+
# Install dependencies if needed
14+
if ! bundle check > /dev/null 2>&1; then
15+
echo "Installing dependencies..."
16+
bundle install
17+
fi
18+
19+
# Run unit tests
20+
echo "Running unit tests..."
21+
bundle exec rspec spec/sso_spec.rb
22+
23+
echo ""
24+
echo "Running integration tests..."
25+
bundle exec rspec spec/sso_integration_spec.rb
26+
27+
echo ""
28+
echo "✓ All tests passed!"

0 commit comments

Comments
 (0)