From 40ae0567563f205eca82b79ef1b4857d49c691bc Mon Sep 17 00:00:00 2001 From: Navarone Feekery <13634519+navarone-feekery@users.noreply.github.com> Date: Thu, 23 May 2024 16:35:54 +0200 Subject: [PATCH 1/2] Add MIT license headers to Faux vendor gem --- config/examples/parks-australia.yml | 2 ++ vendor/faux/lib/faux.rb | 6 ++++++ vendor/faux/lib/faux/element/atom_feed.rb | 6 ++++++ vendor/faux/lib/faux/element/base.rb | 6 ++++++ vendor/faux/lib/faux/element/fixture.rb | 6 ++++++ vendor/faux/lib/faux/element/page.rb | 6 ++++++ vendor/faux/lib/faux/element/path_with_content_length.rb | 6 ++++++ vendor/faux/lib/faux/element/robots.rb | 6 ++++++ vendor/faux/lib/faux/element/sitemap.rb | 6 ++++++ vendor/faux/lib/faux/helpers/url.rb | 6 ++++++ vendor/faux/lib/faux/middleware/reporter.rb | 6 ++++++ vendor/faux/lib/faux/version.rb | 5 +++++ vendor/faux/lib/site.rb | 6 ++++++ vendor/faux/sites/fixture_site.rb | 5 +++++ vendor/faux/sites/robots_txt_respect_rules.rb | 5 +++++ vendor/faux/sites/simple_site.rb | 5 +++++ vendor/faux/sites/sitemap_pointing_to_sitemaps.rb | 5 +++++ vendor/faux/spec/faux/element/atom_feed_spec.rb | 6 ++++++ vendor/faux/spec/faux/element/base_spec.rb | 6 ++++++ vendor/faux/spec/faux/element/fixture_spec.rb | 6 ++++++ vendor/faux/spec/faux/element/page_spec.rb | 6 ++++++ .../faux/spec/faux/element/path_with_content_length_spec.rb | 6 ++++++ vendor/faux/spec/faux/element/robots_spec.rb | 6 ++++++ vendor/faux/spec/faux/element/sitemap_spec.rb | 6 ++++++ vendor/faux/spec/faux/middleware/reporter_spec.rb | 6 ++++++ vendor/faux/spec/faux/site_spec.rb | 6 ++++++ vendor/faux/spec/faux_spec.rb | 6 ++++++ vendor/faux/spec/spec_helper.rb | 6 ++++++ 28 files changed, 159 insertions(+) diff --git a/config/examples/parks-australia.yml b/config/examples/parks-australia.yml index 23f05a6..01c4658 100644 --- a/config/examples/parks-australia.yml +++ b/config/examples/parks-australia.yml @@ -1,5 +1,7 @@ # This is a sample config file for crawling the parksaustralia.gov.au website writing output to an ES index +crawler_id: 1234 + # Domains allowed for the crawl domain_allowlist: - https://parksaustralia.gov.au diff --git a/vendor/faux/lib/faux.rb b/vendor/faux/lib/faux.rb index 0a60a4f..692670d 100644 --- a/vendor/faux/lib/faux.rb +++ b/vendor/faux/lib/faux.rb @@ -1,3 +1,9 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# + require 'active_support' require 'json' require 'rack/mount' diff --git a/vendor/faux/lib/faux/element/atom_feed.rb b/vendor/faux/lib/faux/element/atom_feed.rb index 3fe0979..fcdead1 100644 --- a/vendor/faux/lib/faux/element/atom_feed.rb +++ b/vendor/faux/lib/faux/element/atom_feed.rb @@ -1,3 +1,9 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# + module Faux module Element class AtomFeed < Base diff --git a/vendor/faux/lib/faux/element/base.rb b/vendor/faux/lib/faux/element/base.rb index 9216d30..1182729 100644 --- a/vendor/faux/lib/faux/element/base.rb +++ b/vendor/faux/lib/faux/element/base.rb @@ -1,3 +1,9 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# + module Faux module Element class Base diff --git a/vendor/faux/lib/faux/element/fixture.rb b/vendor/faux/lib/faux/element/fixture.rb index 78c0263..b54fad3 100644 --- a/vendor/faux/lib/faux/element/fixture.rb +++ b/vendor/faux/lib/faux/element/fixture.rb @@ -1,3 +1,9 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# + module Faux module Element class Fixture < Base diff --git a/vendor/faux/lib/faux/element/page.rb b/vendor/faux/lib/faux/element/page.rb index 8bac47b..52a04b8 100644 --- a/vendor/faux/lib/faux/element/page.rb +++ b/vendor/faux/lib/faux/element/page.rb @@ -1,3 +1,9 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# + module Faux module Element class Page < Base diff --git a/vendor/faux/lib/faux/element/path_with_content_length.rb b/vendor/faux/lib/faux/element/path_with_content_length.rb index 7103504..898ab71 100644 --- a/vendor/faux/lib/faux/element/path_with_content_length.rb +++ b/vendor/faux/lib/faux/element/path_with_content_length.rb @@ -1,3 +1,9 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# + require 'active_support/core_ext/numeric' module Faux diff --git a/vendor/faux/lib/faux/element/robots.rb b/vendor/faux/lib/faux/element/robots.rb index bbbd26b..15e9b59 100644 --- a/vendor/faux/lib/faux/element/robots.rb +++ b/vendor/faux/lib/faux/element/robots.rb @@ -1,3 +1,9 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# + module Faux module Element class Robots < Base diff --git a/vendor/faux/lib/faux/element/sitemap.rb b/vendor/faux/lib/faux/element/sitemap.rb index 2940ae7..d47994d 100644 --- a/vendor/faux/lib/faux/element/sitemap.rb +++ b/vendor/faux/lib/faux/element/sitemap.rb @@ -1,3 +1,9 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# + require 'stringio' require 'nokogiri' require 'zlib' diff --git a/vendor/faux/lib/faux/helpers/url.rb b/vendor/faux/lib/faux/helpers/url.rb index 4456b2f..cde5e38 100644 --- a/vendor/faux/lib/faux/helpers/url.rb +++ b/vendor/faux/lib/faux/helpers/url.rb @@ -1,3 +1,9 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# + module Faux module Helpers module Url diff --git a/vendor/faux/lib/faux/middleware/reporter.rb b/vendor/faux/lib/faux/middleware/reporter.rb index afee7cd..e65a0c0 100644 --- a/vendor/faux/lib/faux/middleware/reporter.rb +++ b/vendor/faux/lib/faux/middleware/reporter.rb @@ -1,3 +1,9 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# + module Faux module Middleware diff --git a/vendor/faux/lib/faux/version.rb b/vendor/faux/lib/faux/version.rb index bc9eeba..d084138 100644 --- a/vendor/faux/lib/faux/version.rb +++ b/vendor/faux/lib/faux/version.rb @@ -1,3 +1,8 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# module Faux VERSION = '0.1.0' end diff --git a/vendor/faux/lib/site.rb b/vendor/faux/lib/site.rb index 316415b..1e74d97 100644 --- a/vendor/faux/lib/site.rb +++ b/vendor/faux/lib/site.rb @@ -1,3 +1,9 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# + # frozen_string_literal: true require 'rack' diff --git a/vendor/faux/sites/fixture_site.rb b/vendor/faux/sites/fixture_site.rb index 034ed27..e355f1f 100644 --- a/vendor/faux/sites/fixture_site.rb +++ b/vendor/faux/sites/fixture_site.rb @@ -1,3 +1,8 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# class FixtureSite < Faux::Base fixture '/' do path 'spec/fixtures/simple.html' diff --git a/vendor/faux/sites/robots_txt_respect_rules.rb b/vendor/faux/sites/robots_txt_respect_rules.rb index 44d245e..fde9af8 100644 --- a/vendor/faux/sites/robots_txt_respect_rules.rb +++ b/vendor/faux/sites/robots_txt_respect_rules.rb @@ -1,3 +1,8 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# class RobotsTxtRespectRules < Faux::Base page '/' do body do diff --git a/vendor/faux/sites/simple_site.rb b/vendor/faux/sites/simple_site.rb index 38b10d4..16e99c1 100644 --- a/vendor/faux/sites/simple_site.rb +++ b/vendor/faux/sites/simple_site.rb @@ -1,3 +1,8 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# class SimpleSite < Faux::Base page '/' do head { atom_to '/feed' } diff --git a/vendor/faux/sites/sitemap_pointing_to_sitemaps.rb b/vendor/faux/sites/sitemap_pointing_to_sitemaps.rb index f53d5cc..bdf518e 100644 --- a/vendor/faux/sites/sitemap_pointing_to_sitemaps.rb +++ b/vendor/faux/sites/sitemap_pointing_to_sitemaps.rb @@ -1,3 +1,8 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# class SitemapPointingToSitemaps < Faux::Base robots do user_agent '*' diff --git a/vendor/faux/spec/faux/element/atom_feed_spec.rb b/vendor/faux/spec/faux/element/atom_feed_spec.rb index b35a20f..a206745 100644 --- a/vendor/faux/spec/faux/element/atom_feed_spec.rb +++ b/vendor/faux/spec/faux/element/atom_feed_spec.rb @@ -1,3 +1,9 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# + require 'spec_helper' describe Faux::Element::AtomFeed do diff --git a/vendor/faux/spec/faux/element/base_spec.rb b/vendor/faux/spec/faux/element/base_spec.rb index 9317104..ebc432b 100644 --- a/vendor/faux/spec/faux/element/base_spec.rb +++ b/vendor/faux/spec/faux/element/base_spec.rb @@ -1,3 +1,9 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# + require 'spec_helper' describe Faux::Element::Base do diff --git a/vendor/faux/spec/faux/element/fixture_spec.rb b/vendor/faux/spec/faux/element/fixture_spec.rb index 3cffc11..3a76e40 100644 --- a/vendor/faux/spec/faux/element/fixture_spec.rb +++ b/vendor/faux/spec/faux/element/fixture_spec.rb @@ -1,3 +1,9 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# + require 'spec_helper' describe Faux::Element::Fixture do diff --git a/vendor/faux/spec/faux/element/page_spec.rb b/vendor/faux/spec/faux/element/page_spec.rb index 0d51d3b..d8860fa 100644 --- a/vendor/faux/spec/faux/element/page_spec.rb +++ b/vendor/faux/spec/faux/element/page_spec.rb @@ -1,3 +1,9 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# + require 'spec_helper' describe Faux::Element::Page do diff --git a/vendor/faux/spec/faux/element/path_with_content_length_spec.rb b/vendor/faux/spec/faux/element/path_with_content_length_spec.rb index 893afad..e8d666e 100644 --- a/vendor/faux/spec/faux/element/path_with_content_length_spec.rb +++ b/vendor/faux/spec/faux/element/path_with_content_length_spec.rb @@ -1,3 +1,9 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# + require 'spec_helper' describe Faux::Element::PathWithContentLength do diff --git a/vendor/faux/spec/faux/element/robots_spec.rb b/vendor/faux/spec/faux/element/robots_spec.rb index ab53d19..b6d0fd8 100644 --- a/vendor/faux/spec/faux/element/robots_spec.rb +++ b/vendor/faux/spec/faux/element/robots_spec.rb @@ -1,3 +1,9 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# + require 'spec_helper' describe Faux::Element::Robots do diff --git a/vendor/faux/spec/faux/element/sitemap_spec.rb b/vendor/faux/spec/faux/element/sitemap_spec.rb index ffb5b69..fd0a276 100644 --- a/vendor/faux/spec/faux/element/sitemap_spec.rb +++ b/vendor/faux/spec/faux/element/sitemap_spec.rb @@ -1,3 +1,9 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# + require 'spec_helper' describe Faux::Element::Sitemap do diff --git a/vendor/faux/spec/faux/middleware/reporter_spec.rb b/vendor/faux/spec/faux/middleware/reporter_spec.rb index 29a8061..804911e 100644 --- a/vendor/faux/spec/faux/middleware/reporter_spec.rb +++ b/vendor/faux/spec/faux/middleware/reporter_spec.rb @@ -1,3 +1,9 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# + require 'spec_helper' describe Faux::Middleware::Reporter do diff --git a/vendor/faux/spec/faux/site_spec.rb b/vendor/faux/spec/faux/site_spec.rb index 5d4eeda..be3bff0 100644 --- a/vendor/faux/spec/faux/site_spec.rb +++ b/vendor/faux/spec/faux/site_spec.rb @@ -1,3 +1,9 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# + require 'spec_helper' describe Faux::Site do diff --git a/vendor/faux/spec/faux_spec.rb b/vendor/faux/spec/faux_spec.rb index dc42fea..613b1af 100644 --- a/vendor/faux/spec/faux_spec.rb +++ b/vendor/faux/spec/faux_spec.rb @@ -1,3 +1,9 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# + require 'spec_helper' describe Faux::Base do diff --git a/vendor/faux/spec/spec_helper.rb b/vendor/faux/spec/spec_helper.rb index b60e1cf..e46ee00 100644 --- a/vendor/faux/spec/spec_helper.rb +++ b/vendor/faux/spec/spec_helper.rb @@ -1,3 +1,9 @@ +# +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the MIT License; +# see LICENSE file in the project root for details +# + require 'bundler/setup' require 'rspec' require 'rack/test' From 7078ee3762fb3745ad2dc57e6ca8ea453b6e1f94 Mon Sep 17 00:00:00 2001 From: Navarone Feekery <13634519+navarone-feekery@users.noreply.github.com> Date: Thu, 23 May 2024 16:37:02 +0200 Subject: [PATCH 2/2] Remove debug config --- config/examples/parks-australia.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/config/examples/parks-australia.yml b/config/examples/parks-australia.yml index 01c4658..23f05a6 100644 --- a/config/examples/parks-australia.yml +++ b/config/examples/parks-australia.yml @@ -1,7 +1,5 @@ # This is a sample config file for crawling the parksaustralia.gov.au website writing output to an ES index -crawler_id: 1234 - # Domains allowed for the crawl domain_allowlist: - https://parksaustralia.gov.au