diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f391d41..a25092c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.6.0" + ".": "3.6.1" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 27548de..ea1fdd4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 8 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-5d0052068f044366d6d31570d9712922c9a80fdd6f9995af815e9afc075507ef.yml -openapi_spec_hash: c0cb787da075d8cd2d938c05b36b5efa -config_hash: 4252fc025e947bc0fd6b2abd91a0cc8e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-6fd391f729eb05dc7b6168adff89e6198bc545ebd4ff737494d72288870e0977.yml +openapi_spec_hash: ee16862542659f47acc8dcd5669c7623 +config_hash: 7386d24e2f03a3b2a89b3f6881446348 diff --git a/CHANGELOG.md b/CHANGELOG.md index 9af0c8f..90e5f40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 3.6.1 (2026-02-20) + +Full Changelog: [v3.6.0...v3.6.1](https://github.com/browserbase/stagehand-ruby/compare/v3.6.0...v3.6.1) + +### Chores + +* **internal:** remove mock server code ([621ce32](https://github.com/browserbase/stagehand-ruby/commit/621ce327c5c39cfebd023ca4a3b178f4eada2cdc)) +* update mock server docs ([29f592b](https://github.com/browserbase/stagehand-ruby/commit/29f592b49d6b99450bd695a0f18f5addefcdade0)) + ## 3.6.0 (2026-02-18) Full Changelog: [v3.5.2...v3.6.0](https://github.com/browserbase/stagehand-ruby/compare/v3.5.2...v3.6.0) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c2d5f73..85a5bad 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -66,12 +66,6 @@ $ bundle exec rake ## Running tests -Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests. - -```bash -$ npx prism mock path/to/your/openapi.yml -``` - ```bash $ bundle exec rake test ``` diff --git a/Gemfile.lock b/Gemfile.lock index 8641e39..3a58c05 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - stagehand (3.6.0) + stagehand (3.6.1) cgi connection_pool diff --git a/lib/stagehand/version.rb b/lib/stagehand/version.rb index 030fa92..ab43815 100644 --- a/lib/stagehand/version.rb +++ b/lib/stagehand/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Stagehand - VERSION = "3.6.0" + VERSION = "3.6.1" end diff --git a/scripts/mock b/scripts/mock deleted file mode 100755 index 0b28f6e..0000000 --- a/scripts/mock +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash - -set -e - -cd "$(dirname "$0")/.." - -if [[ -n "$1" && "$1" != '--'* ]]; then - URL="$1" - shift -else - URL="$(grep 'openapi_spec_url' .stats.yml | cut -d' ' -f2)" -fi - -# Check if the URL is empty -if [ -z "$URL" ]; then - echo "Error: No OpenAPI spec path/url provided or found in .stats.yml" - exit 1 -fi - -echo "==> Starting mock server with URL ${URL}" - -# Run prism mock on the given spec -if [ "$1" == "--daemon" ]; then - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log & - - # Wait for server to come online - echo -n "Waiting for server" - while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do - echo -n "." - sleep 0.1 - done - - if grep -q "✖ fatal" ".prism.log"; then - cat .prism.log - exit 1 - fi - - echo -else - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" -fi diff --git a/scripts/test b/scripts/test index e0dc137..df8caf9 100755 --- a/scripts/test +++ b/scripts/test @@ -4,53 +4,7 @@ set -e cd -- "$(dirname -- "$0")/.." -RED='\033[0;31m' -GREEN='\033[0;32m' -YELLOW='\033[0;33m' -NC='\033[0m' # No Color -function prism_is_running() { - curl --silent "http://localhost:4010" >/dev/null 2>&1 -} - -kill_server_on_port() { - pids=$(lsof -t -i tcp:"$1" || echo "") - if [ "$pids" != "" ]; then - kill "$pids" - echo "Stopped $pids." - fi -} - -function is_overriding_api_base_url() { - [ -n "$TEST_API_BASE_URL" ] -} - -if ! is_overriding_api_base_url && ! prism_is_running ; then - # When we exit this script, make sure to kill the background mock server process - trap 'kill_server_on_port 4010' EXIT - - # Start the dev server - ./scripts/mock --daemon -fi - -if is_overriding_api_base_url ; then - echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}" - echo -elif ! prism_is_running ; then - echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server" - echo -e "running against your OpenAPI spec." - echo - echo -e "To run the server, pass in the path or url of your OpenAPI" - echo -e "spec to the prism command:" - echo - echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}" - echo - - exit 1 -else - echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}" - echo -fi echo "==> Running tests" bundle exec rake test "$@" diff --git a/test/stagehand/resources/sessions_test.rb b/test/stagehand/resources/sessions_test.rb index 47910aa..e99bb9d 100644 --- a/test/stagehand/resources/sessions_test.rb +++ b/test/stagehand/resources/sessions_test.rb @@ -4,7 +4,7 @@ class Stagehand::Test::Resources::SessionsTest < Stagehand::Test::ResourceTest def test_act_required_params - skip("Prism tests are disabled") + skip("Mock server tests are disabled") response = @stagehand.sessions.act("c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123", input: "Click the login button") @@ -22,7 +22,7 @@ def test_act_required_params end def test_end_ - skip("Prism tests are disabled") + skip("Mock server tests are disabled") response = @stagehand.sessions.end_("c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123") @@ -38,7 +38,7 @@ def test_end_ end def test_execute_required_params - skip("Prism tests are disabled") + skip("Mock server tests are disabled") response = @stagehand.sessions.execute( @@ -62,7 +62,7 @@ def test_execute_required_params end def test_extract - skip("Prism tests are disabled") + skip("Mock server tests are disabled") response = @stagehand.sessions.extract("c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123") @@ -79,7 +79,7 @@ def test_extract end def test_navigate_required_params - skip("Prism tests are disabled") + skip("Mock server tests are disabled") response = @stagehand.sessions.navigate("c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123", url: "https://example.com") @@ -97,7 +97,7 @@ def test_navigate_required_params end def test_observe - skip("Prism tests are disabled") + skip("Mock server tests are disabled") response = @stagehand.sessions.observe("c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123") @@ -114,7 +114,7 @@ def test_observe end def test_replay - skip("Prism tests are disabled") + skip("Mock server tests are disabled") response = @stagehand.sessions.replay("c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123") @@ -131,7 +131,7 @@ def test_replay end def test_start_required_params - skip("Prism tests are disabled") + skip("Mock server tests are disabled") response = @stagehand.sessions.start(model_name: "openai/gpt-4o")