From 4525edf3fd2108ad0601dd2a42ad7b05705a269a Mon Sep 17 00:00:00 2001 From: Gil Desmarais Date: Sun, 6 Sep 2026 10:31:14 +0200 Subject: [PATCH] chore(configs): migrate legacy faraday strategy declarations to default and update specs --- lib/html2rss/configs/canada.ca/en_stories.yml | 1 - lib/html2rss/configs/ecologie.gouv.fr/presse.yml | 1 - lib/html2rss/configs/forskningsradet.no/en_news.yml | 1 - lib/html2rss/configs/parks.vic.gov.au/news.yml | 1 - lib/html2rss/configs/standards.org.au/news.yml | 1 - lib/html2rss/configs/unep-wcmc.org/en_news.yml | 1 - spec/support/botasaurus_fetch_configs.rb | 2 ++ spec/support/shared_examples/config.yml_spec.rb | 5 ++--- 8 files changed, 4 insertions(+), 9 deletions(-) diff --git a/lib/html2rss/configs/canada.ca/en_stories.yml b/lib/html2rss/configs/canada.ca/en_stories.yml index 988a6f1c..83ef5d99 100644 --- a/lib/html2rss/configs/canada.ca/en_stories.yml +++ b/lib/html2rss/configs/canada.ca/en_stories.yml @@ -17,4 +17,3 @@ selectors: items: selector: main > section > div > article > div > div > div enhance: true -strategy: faraday diff --git a/lib/html2rss/configs/ecologie.gouv.fr/presse.yml b/lib/html2rss/configs/ecologie.gouv.fr/presse.yml index 0e2d614c..8058af76 100644 --- a/lib/html2rss/configs/ecologie.gouv.fr/presse.yml +++ b/lib/html2rss/configs/ecologie.gouv.fr/presse.yml @@ -17,4 +17,3 @@ selectors: items: selector: div.fr-col enhance: true -strategy: faraday diff --git a/lib/html2rss/configs/forskningsradet.no/en_news.yml b/lib/html2rss/configs/forskningsradet.no/en_news.yml index df9ce2d2..fb238689 100644 --- a/lib/html2rss/configs/forskningsradet.no/en_news.yml +++ b/lib/html2rss/configs/forskningsradet.no/en_news.yml @@ -17,4 +17,3 @@ selectors: items: selector: main > div > div > div enhance: true -strategy: faraday diff --git a/lib/html2rss/configs/parks.vic.gov.au/news.yml b/lib/html2rss/configs/parks.vic.gov.au/news.yml index ff0ac0b1..ad8cb174 100644 --- a/lib/html2rss/configs/parks.vic.gov.au/news.yml +++ b/lib/html2rss/configs/parks.vic.gov.au/news.yml @@ -17,4 +17,3 @@ selectors: items: selector: div.col-sm-10 enhance: true -strategy: faraday diff --git a/lib/html2rss/configs/standards.org.au/news.yml b/lib/html2rss/configs/standards.org.au/news.yml index d82f47c9..9e465f5d 100644 --- a/lib/html2rss/configs/standards.org.au/news.yml +++ b/lib/html2rss/configs/standards.org.au/news.yml @@ -17,4 +17,3 @@ selectors: items: selector: div.articles-text-div enhance: true -strategy: faraday diff --git a/lib/html2rss/configs/unep-wcmc.org/en_news.yml b/lib/html2rss/configs/unep-wcmc.org/en_news.yml index 7f54275f..cd23846d 100644 --- a/lib/html2rss/configs/unep-wcmc.org/en_news.yml +++ b/lib/html2rss/configs/unep-wcmc.org/en_news.yml @@ -17,4 +17,3 @@ selectors: items: selector: li.listing-grid__item enhance: true -strategy: faraday diff --git a/spec/support/botasaurus_fetch_configs.rb b/spec/support/botasaurus_fetch_configs.rb index 47b7345a..4dc39dda 100644 --- a/spec/support/botasaurus_fetch_configs.rb +++ b/spec/support/botasaurus_fetch_configs.rb @@ -12,9 +12,11 @@ module BotasaurusFetchConfigs chathamhouse.org/research-publications.yml curia.europa.eu/press-releases.yml ethz.ch/eth-news.yml + hkma.gov.hk/eng_news-and-media_press-releases.yml iiss.org/online-analysis.yml imdb.com/ratings.yml imo.org/press-briefings.yml + ndl.go.jp/en_news.yml ntu.edu.sg/news.yml occrp.org/news.yml oecd.org/newsroom.yml diff --git a/spec/support/shared_examples/config.yml_spec.rb b/spec/support/shared_examples/config.yml_spec.rb index edf9b51b..47681224 100644 --- a/spec/support/shared_examples/config.yml_spec.rb +++ b/spec/support/shared_examples/config.yml_spec.rb @@ -87,9 +87,8 @@ context 'with selectors present' do it 'has required selectors', :aggregate_failures do - %w[items title].each do |required_attribute| - expect(yaml['selectors'][required_attribute]).not_to(be_empty, required_attribute) - end + expect(yaml['selectors']['items']).not_to be_empty + expect(yaml['selectors']['title']).not_to be_empty unless yaml.dig('selectors', 'items', 'enhance') end context 'with template post_processor' do