Skip to content

feat(config): add browserless configs and fetch lane#304

Merged
gildesmarais merged 3 commits intomasterfrom
feat/e1-configs-browserless-lane
Mar 27, 2026
Merged

feat(config): add browserless configs and fetch lane#304
gildesmarais merged 3 commits intomasterfrom
feat/e1-configs-browserless-lane

Conversation

@gildesmarais
Copy link
Copy Markdown
Member

Summary

  • add curated Browserless-backed configs for Apple Newsroom, DeepMind Blog, Notion Blog, Shopify Blog Latest, and Spotify Newsroom
  • route Browserless-backed fetch specs through a dedicated config list and strategy toggle in shared examples
  • add a dedicated Browserless fetch command (make test-fetch-browserless-configs) and document fetch-lane usage in README
  • accept the documented local Browserless endpoint (ws://127.0.0.1:4002) without requiring API token

This pull request adds support for testing and running Browserless-backed fetch strategies for a subset of configs, improves test configuration, and enhances documentation for these new test lanes. It introduces new config files that use the Browserless strategy, adds logic to selectively run these tests based on environment variables, and provides clear instructions in the README.

Browserless-backed config support:

  • Added new configs using the browserless strategy for apple.com/newsroom.yml, deepmind.google/blog.yml, notion.com/blog.yml, shopify.com/blog.yml, and spotify.com/newsroom.yml. [1] [2] [3] [4] [5]
  • Introduced BrowserlessFetchConfigs module to track which configs require Browserless and to check if the necessary environment variables are set.

Test suite enhancements:

  • Updated shared config spec logic to use runtime browser header defaults and to conditionally skip Browserless-backed tests if the environment is not configured, ensuring tests only run when appropriate. [1] [2] [3]
  • Added spec/browserless_fetch_configs_spec.rb with tests for the environment-checking logic in BrowserlessFetchConfigs.

Build and documentation improvements:

  • Updated the Makefile to add test-fetch-browserless-configs and refine how fetch tests are run, separating all fetch tests from Browserless-only tests.
  • Expanded the README.md with documentation on how to run the new fetch test lanes, including environment variable requirements and usage instructions.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a Browserless-backed “fetch lane” to the config test suite, along with a curated set of Browserless-only configs, so live fetch specs can be run selectively depending on environment configuration.

Changes:

  • Added 5 new strategy: browserless configs (Apple Newsroom, DeepMind Blog, Notion Blog, Shopify Blog Latest, Spotify Newsroom).
  • Introduced BrowserlessFetchConfigs and updated shared fetch examples to conditionally skip Browserless configs unless Browserless env vars are configured.
  • Added a dedicated Browserless fetch runner (bin/rspec_browserless_configs), a Makefile target, and documented fetch lanes in the README.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
spec/support/shared_examples/config.yml_spec.rb Applies runtime header defaults in fetch specs and skips Browserless-backed fetch tests when env isn’t configured.
spec/support/browserless_fetch_configs.rb Defines the curated Browserless config subset + env gating logic (local websocket exception).
spec/browserless_fetch_configs_spec.rb Tests Browserless env gating behavior (local URLs vs non-local).
lib/html2rss/configs/apple.com/newsroom.yml New Browserless-backed config for Apple Newsroom.
lib/html2rss/configs/deepmind.google/blog.yml New Browserless-backed config for DeepMind Blog.
lib/html2rss/configs/notion.com/blog.yml New Browserless-backed config for Notion Blog.
lib/html2rss/configs/shopify.com/blog.yml New Browserless-backed config for Shopify Blog Latest.
lib/html2rss/configs/spotify.com/newsroom.yml New Browserless-backed config for Spotify Newsroom.
bin/rspec_browserless_configs New script to run only the Browserless-backed fetch subset.
README.md Documents the two fetch lanes and Browserless env requirements.
Makefile Adds test-fetch-browserless-configs and updates test-fetch-all-configs runner.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gildesmarais gildesmarais merged commit 6631881 into master Mar 27, 2026
7 checks passed
@gildesmarais gildesmarais deleted the feat/e1-configs-browserless-lane branch March 27, 2026 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants