wayfarer 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.env +8 -8
- data/.github/CODEOWNERS +1 -0
- data/.github/workflows/push.yaml +18 -5
- data/.github/workflows/release.yaml +1 -1
- data/.github/workflows/terraform.yaml +78 -0
- data/AGENTS.md +27 -1
- data/Dockerfile +2 -1
- data/Gemfile.lock +1 -1
- data/MAINTENANCE.md +17 -0
- data/docker-compose.yml +4 -4
- data/docs/guides/{development.md → architecture.md} +1 -9
- data/examples/open_systems.rb +23 -0
- data/lib/wayfarer/cli.rb +1 -0
- data/lib/wayfarer.rb +1 -1
- data/mise.toml +3 -0
- data/mkdocs.yml +2 -2
- data/rake/terraform.rake +18 -0
- data/terraform/.gitignore +6 -0
- data/terraform/.terraform.lock.hcl +24 -0
- data/terraform/actions.tf +10 -0
- data/terraform/branch_protection.tf +48 -0
- data/terraform/github.tfstate +257 -0
- data/terraform/main.tf +31 -0
- data/terraform/variables.tf +11 -0
- data/terraform/versions.tf +14 -0
- data/wayfarer.gemspec +1 -1
- metadata +15 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 775539013b38816a1cc15583b6416cd596a28ce72866cdbc624c2b045b4ca740
|
|
4
|
+
data.tar.gz: '001657096ad53a1c860bc261a80efd3204fc6683f44093fb30a8d51d4937aea6'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fc734cccedfc842f528b71adc961c01d2d104af58556b508bbd98ed80c635dff6385765b14223e765e6d40ab7c273c807b42cd9cfe44fbcb1e670a325319d53c
|
|
7
|
+
data.tar.gz: b4916f7291ec3cf62935cf69cc078fbe259f1b5dc5c8c877b8256b660f19d93515a76289157dff147df1f0725a4e95c457e38bef3a048adae1cda02ac5a0d34f
|
data/.env
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
CI=true
|
|
2
2
|
WAYFARER_PORT=9876
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
# redis:8-alpine
|
|
5
|
+
REDIS_IMAGE=redis@sha256:8096655e437712b07503796fb64d81359256cfcff0ab29d95a7da72863786efb
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
# browserless/chrome:1.61.1-chrome-stable
|
|
8
|
+
CHROME_IMAGE=browserless/chrome@sha256:efac47cfff3830d9a50b27d29f8bbb61949058ae336c823fbe9bd3c0d1debcc8
|
|
9
9
|
CHROME_PORT=3000
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
# selenium/standalone-firefox:4.46.0
|
|
12
|
+
FIREFOX_IMAGE=selenium/standalone-firefox@sha256:68754beb3956735905fe9a49004d71c3e1de7b410885151fd8f139618e9537dc
|
|
13
13
|
FIREFOX_PORT=4444
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
# squidfunk/mkdocs-material:9.7.7
|
|
16
|
+
DOCS_IMAGE=squidfunk/mkdocs-material@sha256:51b87149d227691486b5f08993d28c65ca7e4990010664b697265b8e6fcd5287
|
|
17
17
|
DOCS_PORT=8000
|
data/.github/CODEOWNERS
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/terraform/ @bauerd
|
data/.github/workflows/push.yaml
CHANGED
|
@@ -18,7 +18,7 @@ jobs:
|
|
|
18
18
|
lint:
|
|
19
19
|
runs-on: ubuntu-latest
|
|
20
20
|
steps:
|
|
21
|
-
- uses: actions/checkout@v4
|
|
21
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
22
22
|
|
|
23
23
|
- name: Start services
|
|
24
24
|
run: docker compose up -d wayfarer
|
|
@@ -45,7 +45,7 @@ jobs:
|
|
|
45
45
|
unit-tests:
|
|
46
46
|
runs-on: ubuntu-latest
|
|
47
47
|
steps:
|
|
48
|
-
- uses: actions/checkout@v4
|
|
48
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
49
49
|
|
|
50
50
|
- name: Set up Docker Compose
|
|
51
51
|
run: docker compose up -d
|
|
@@ -59,7 +59,7 @@ jobs:
|
|
|
59
59
|
check-links:
|
|
60
60
|
runs-on: ubuntu-latest
|
|
61
61
|
steps:
|
|
62
|
-
- uses: actions/checkout@v4
|
|
62
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
63
63
|
|
|
64
64
|
- name: Setup mise
|
|
65
65
|
uses: ./.github/actions/setup-mise
|
|
@@ -72,10 +72,23 @@ jobs:
|
|
|
72
72
|
|
|
73
73
|
- name: Upload artifact
|
|
74
74
|
if: github.ref_name == github.event.repository.default_branch
|
|
75
|
-
uses: actions/upload-pages-artifact@v3
|
|
75
|
+
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
|
|
76
76
|
with:
|
|
77
77
|
path: 'site'
|
|
78
78
|
|
|
79
|
+
secret-scan:
|
|
80
|
+
runs-on: ubuntu-latest
|
|
81
|
+
steps:
|
|
82
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
83
|
+
with:
|
|
84
|
+
fetch-depth: 0
|
|
85
|
+
|
|
86
|
+
- name: Setup mise
|
|
87
|
+
uses: ./.github/actions/setup-mise
|
|
88
|
+
|
|
89
|
+
- name: gitleaks
|
|
90
|
+
run: gitleaks detect --source . --redact --no-banner
|
|
91
|
+
|
|
79
92
|
deploy-docs:
|
|
80
93
|
needs: check-links
|
|
81
94
|
if: github.ref_name == github.event.repository.default_branch
|
|
@@ -86,4 +99,4 @@ jobs:
|
|
|
86
99
|
steps:
|
|
87
100
|
- name: Deploy to GitHub Pages
|
|
88
101
|
id: deployment
|
|
89
|
-
uses: actions/deploy-pages@v4
|
|
102
|
+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
name: Terraform
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
paths:
|
|
6
|
+
- 'terraform/**'
|
|
7
|
+
- 'mise.toml'
|
|
8
|
+
- '.github/workflows/terraform.yaml'
|
|
9
|
+
- '.github/actions/setup-mise/**'
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
lint-terraform:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
16
|
+
|
|
17
|
+
- name: Setup mise
|
|
18
|
+
uses: ./.github/actions/setup-mise
|
|
19
|
+
|
|
20
|
+
- name: terraform fmt
|
|
21
|
+
run: terraform -chdir=terraform fmt -check -recursive -diff
|
|
22
|
+
|
|
23
|
+
- name: terraform init
|
|
24
|
+
if: success() || failure()
|
|
25
|
+
run: terraform -chdir=terraform init -backend=false -input=false
|
|
26
|
+
|
|
27
|
+
- name: terraform validate
|
|
28
|
+
if: success() || failure()
|
|
29
|
+
run: terraform -chdir=terraform validate
|
|
30
|
+
|
|
31
|
+
- name: checkov
|
|
32
|
+
if: success() || failure()
|
|
33
|
+
run: checkov --directory terraform --framework terraform --quiet --compact --skip-download --skip-check CKV_GIT_3
|
|
34
|
+
|
|
35
|
+
terraform-plan:
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
steps:
|
|
38
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
39
|
+
|
|
40
|
+
- name: Setup mise
|
|
41
|
+
uses: ./.github/actions/setup-mise
|
|
42
|
+
|
|
43
|
+
- name: terraform init
|
|
44
|
+
run: terraform -chdir=terraform init -input=false
|
|
45
|
+
|
|
46
|
+
- name: terraform plan
|
|
47
|
+
env:
|
|
48
|
+
GITHUB_TOKEN: ${{ secrets.TF_GITHUB_TOKEN }}
|
|
49
|
+
run: terraform -chdir=terraform plan -input=false -no-color
|
|
50
|
+
|
|
51
|
+
terraform-apply:
|
|
52
|
+
needs: [lint-terraform, terraform-plan]
|
|
53
|
+
if: github.ref_name == github.event.repository.default_branch
|
|
54
|
+
runs-on: ubuntu-latest
|
|
55
|
+
environment: terraform-apply
|
|
56
|
+
concurrency:
|
|
57
|
+
group: terraform-apply
|
|
58
|
+
cancel-in-progress: false
|
|
59
|
+
permissions:
|
|
60
|
+
contents: write
|
|
61
|
+
steps:
|
|
62
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
63
|
+
with:
|
|
64
|
+
token: ${{ secrets.TF_APPLY_TOKEN }}
|
|
65
|
+
|
|
66
|
+
- name: Setup mise
|
|
67
|
+
uses: ./.github/actions/setup-mise
|
|
68
|
+
|
|
69
|
+
- name: terraform init
|
|
70
|
+
run: terraform -chdir=terraform init -input=false
|
|
71
|
+
|
|
72
|
+
- name: terraform apply
|
|
73
|
+
env:
|
|
74
|
+
GITHUB_TOKEN: ${{ secrets.TF_APPLY_TOKEN }}
|
|
75
|
+
run: terraform -chdir=terraform apply -auto-approve -input=false -no-color
|
|
76
|
+
|
|
77
|
+
- name: commit updated state
|
|
78
|
+
run: rake -f rake/terraform.rake terraform:commit_state
|
data/AGENTS.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Project Overview
|
|
4
4
|
|
|
5
|
-
Wayfarer is a Ruby gem (v0.5.
|
|
5
|
+
Wayfarer is a Ruby gem (v0.5.1) for versatile web crawling, built on top of **ActiveJob**. It provides a middleware-based pipeline for fetching, parsing, deduplicating, and routing web pages, with support for plain HTTP, headless Chrome (Ferrum/Capybara), and Selenium browser automation.
|
|
6
6
|
|
|
7
7
|
- **Gem name:** `wayfarer`
|
|
8
8
|
- **Ruby version:** 3.4.4 (enforced via `mise.toml`)
|
|
@@ -252,6 +252,32 @@ Fix all errors and warnings. Suggestions (passive voice, acronym expansion) are
|
|
|
252
252
|
|
|
253
253
|
---
|
|
254
254
|
|
|
255
|
+
## Pinning external artifacts
|
|
256
|
+
|
|
257
|
+
Reference every container image and OCI artifact by immutable `@sha256:...`
|
|
258
|
+
digest, not by tag. Tags are mutable and can silently change what runs; digests
|
|
259
|
+
can't. This applies to `Dockerfile` `FROM` lines, image references in
|
|
260
|
+
`docker-compose.yml` and `.env`, and anything else in the repository that pulls
|
|
261
|
+
an image.
|
|
262
|
+
|
|
263
|
+
Put the human-readable tag on a comment line above the pinned reference so
|
|
264
|
+
future upgrades know which version was previously in use. Resolve a digest with
|
|
265
|
+
a manifest HEAD request against Docker Hub, or with `crane digest <image>:<tag>`
|
|
266
|
+
or `regctl image digest <image>:<tag>`.
|
|
267
|
+
|
|
268
|
+
Pin GitHub Actions the same way. Use the commit SHA in the `uses:` line with the
|
|
269
|
+
release tag as a trailing comment, e.g.:
|
|
270
|
+
|
|
271
|
+
```yaml
|
|
272
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Tools installed via mise are exempt; the mise lock file already pins their
|
|
276
|
+
integrity. Terraform providers are exempt for the same reason: `.terraform.lock.hcl`
|
|
277
|
+
pins them by version and hash.
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
255
281
|
## Key Conventions
|
|
256
282
|
|
|
257
283
|
- **All files:** `# frozen_string_literal: true` at the top
|
data/Dockerfile
CHANGED
data/Gemfile.lock
CHANGED
data/MAINTENANCE.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Maintenance
|
|
2
|
+
|
|
3
|
+
## CI environment variables
|
|
4
|
+
|
|
5
|
+
| Key | Value | Description |
|
|
6
|
+
|---|---|---|
|
|
7
|
+
| `GEM_HOST_API_KEY` | RubyGems API key | Publishes the `wayfarer` gem to rubygems.org from the `release` workflow. |
|
|
8
|
+
| `TF_GITHUB_TOKEN` | Fine-grained PAT | Renders `terraform plan` against the live GitHub API in the `terraform-plan` job. Scopes: Metadata (R), Administration (R), Actions (R). |
|
|
9
|
+
| `TF_APPLY_TOKEN` | Fine-grained PAT | Runs `terraform apply` and pushes updated state back to `master` in the `terraform-apply` job. Scopes: Metadata (R), Administration (RW), Actions (RW), Contents (RW). |
|
|
10
|
+
|
|
11
|
+
## Releases
|
|
12
|
+
|
|
13
|
+
1. Bump versions:
|
|
14
|
+
* `Wayfarer::VERSION` in `lib/wayfarer.rb`
|
|
15
|
+
* RubyGem version in `wayfarer.gemspec`
|
|
16
|
+
* Run `bundle install` to regenerate `Gemfile.lock`
|
|
17
|
+
2. Push to `master` and run the manual `release` workflow
|
data/docker-compose.yml
CHANGED
|
@@ -16,22 +16,22 @@ services:
|
|
|
16
16
|
- docs
|
|
17
17
|
|
|
18
18
|
redis:
|
|
19
|
-
image: ${REDIS_IMAGE}
|
|
19
|
+
image: ${REDIS_IMAGE}
|
|
20
20
|
|
|
21
21
|
chrome:
|
|
22
|
-
image: ${CHROME_IMAGE}
|
|
22
|
+
image: ${CHROME_IMAGE}
|
|
23
23
|
ports:
|
|
24
24
|
- "${CHROME_PORT}:${CHROME_PORT}"
|
|
25
25
|
|
|
26
26
|
firefox:
|
|
27
|
-
image: ${FIREFOX_IMAGE}
|
|
27
|
+
image: ${FIREFOX_IMAGE}
|
|
28
28
|
ports:
|
|
29
29
|
- "${FIREFOX_PORT}:${FIREFOX_PORT}"
|
|
30
30
|
volumes:
|
|
31
31
|
- /dev/shm:/dev/shm
|
|
32
32
|
|
|
33
33
|
docs:
|
|
34
|
-
image: ${DOCS_IMAGE}
|
|
34
|
+
image: ${DOCS_IMAGE}
|
|
35
35
|
volumes:
|
|
36
36
|
- ./:/docs
|
|
37
37
|
ports:
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
## Release Procedure
|
|
4
|
-
|
|
5
|
-
1. Bump versions:
|
|
6
|
-
* `Wayfarer::VERSION` in `lib/wayfarer.rb`
|
|
7
|
-
* RubyGem version in `wayfarer.gemspec`
|
|
8
|
-
* Run `bundle install` to regenerate `Gemfile.lock`
|
|
9
|
-
2. Push to `master` or `develop` and run the manual `release` worflow
|
|
1
|
+
# Architecture
|
|
10
2
|
|
|
11
3
|
## Conventions and guidelines
|
|
12
4
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "active_job"
|
|
4
|
+
require "wayfarer"
|
|
5
|
+
|
|
6
|
+
START_URL = "https://www.open-systems.com"
|
|
7
|
+
CONCURRENCY = 4
|
|
8
|
+
|
|
9
|
+
Wayfarer.config[:redis][:factory] = ->(_) { MockRedis.new }
|
|
10
|
+
Wayfarer.config[:network][:agent] = :ferrum
|
|
11
|
+
Wayfarer.config[:network][:pool][:size] = CONCURRENCY
|
|
12
|
+
Wayfarer.config[:ferrum][:options] = { headless: false }
|
|
13
|
+
|
|
14
|
+
class OpenSystemsJob < ActiveJob::Base
|
|
15
|
+
include Wayfarer::Base
|
|
16
|
+
|
|
17
|
+
route.host "open-systems.com", to: :index
|
|
18
|
+
|
|
19
|
+
def index
|
|
20
|
+
puts page.url
|
|
21
|
+
stage page.meta.links.internal
|
|
22
|
+
end
|
|
23
|
+
end
|
data/lib/wayfarer/cli.rb
CHANGED
data/lib/wayfarer.rb
CHANGED
data/mise.toml
CHANGED
data/mkdocs.yml
CHANGED
|
@@ -76,9 +76,9 @@ nav:
|
|
|
76
76
|
- Selenium: guides/networking/selenium.md
|
|
77
77
|
- Capybara: guides/networking/capybara.md
|
|
78
78
|
- Redis: guides/redis.md
|
|
79
|
-
-
|
|
79
|
+
- Architecture: guides/architecture.md
|
|
80
80
|
- Cookbook:
|
|
81
81
|
- Browser navigation: cookbook/navigation.md
|
|
82
82
|
- Executing JavaScript: cookbook/executing_javascript.md
|
|
83
83
|
- Screenhots: cookbook/screenshots.md
|
|
84
|
-
- API documentation: "https://www.rubydoc.info"
|
|
84
|
+
- API documentation: "https://www.rubydoc.info/gems/wayfarer"
|
data/rake/terraform.rake
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
GITHUB_STATE_FILE = "terraform/github.tfstate"
|
|
4
|
+
|
|
5
|
+
namespace :terraform do
|
|
6
|
+
task :commit_state do
|
|
7
|
+
if system("git", "diff", "--quiet", "--", GITHUB_STATE_FILE)
|
|
8
|
+
puts "State unchanged; nothing to commit."
|
|
9
|
+
next
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
sh "git", "config", "user.name", "github-actions[bot]"
|
|
13
|
+
sh "git", "config", "user.email", "41898282+github-actions[bot]@users.noreply.github.com"
|
|
14
|
+
sh "git", "add", GITHUB_STATE_FILE
|
|
15
|
+
sh "git", "commit", "-m", "terraform: update state [skip ci]"
|
|
16
|
+
sh "git", "push"
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# This file is maintained automatically by "terraform init".
|
|
2
|
+
# Manual edits may be lost in future updates.
|
|
3
|
+
|
|
4
|
+
provider "registry.terraform.io/integrations/github" {
|
|
5
|
+
version = "6.13.0"
|
|
6
|
+
constraints = "~> 6.4"
|
|
7
|
+
hashes = [
|
|
8
|
+
"h1:y0Sujto8gttV86innNp/LTMzq7CqsFpBs7XKH8AlMl4=",
|
|
9
|
+
"zh:0ab29fc21699f34345cf0bbbe44745fd1b143b7c73b410c1dc4abe05ffad0a84",
|
|
10
|
+
"zh:1aed10d06755d420bb3a893bf548ab2932297a9d094c04c5a8501e949ca186ed",
|
|
11
|
+
"zh:2a6a11c21eae408055f45b9533c07afd2e845f6d496fd1b645aec2e873012103",
|
|
12
|
+
"zh:5dd05dee677f6ebdbed00cbb1b9be444ab2d1062d345cbc9ec50a47cb41b8622",
|
|
13
|
+
"zh:6b757d034831243d67ddda869eac4368cef539848bd97511f4d68f1aa38a9c88",
|
|
14
|
+
"zh:947c9b5b238f0364c57a705beabd24d3eea3159a6f3a24c07e3fbb13657ffae0",
|
|
15
|
+
"zh:a676549a98164b61630658cbeb6c17820331ca04a049dc9b5095996a0c31ffbe",
|
|
16
|
+
"zh:a8a81b7fe41dd61eb6a6fa5e08a4dd9ee070e862868252a7fd4cfce30364efee",
|
|
17
|
+
"zh:c26a9bca4865665084e7f59b1402d7aff34ee63a418d7401a0658fa280cad4d4",
|
|
18
|
+
"zh:c638d8d0762e62ea188f86302954ef4c92803f2160f0a45fca0cd13974bd3725",
|
|
19
|
+
"zh:e739a0b7e81ca816944a18a38e679f4015edf8be7ac319815cdea865ba7727d7",
|
|
20
|
+
"zh:ec099487ea3de8999c84b3b791e242d728461e51fe344832b37bd8d521201c77",
|
|
21
|
+
"zh:f016ff9e2daab5b88185cec0795213049d105439ffd585d3309a714514ccae13",
|
|
22
|
+
"zh:fbd1fee2c9df3aa19cf8851ce134dea6e45ea01cb85695c1726670c285797e25",
|
|
23
|
+
]
|
|
24
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
resource "github_repository_ruleset" "master" {
|
|
2
|
+
name = "master"
|
|
3
|
+
repository = github_repository.wayfarer.name
|
|
4
|
+
target = "branch"
|
|
5
|
+
enforcement = "active"
|
|
6
|
+
|
|
7
|
+
bypass_actors {
|
|
8
|
+
actor_id = 5
|
|
9
|
+
actor_type = "RepositoryRole"
|
|
10
|
+
bypass_mode = "always"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
conditions {
|
|
14
|
+
ref_name {
|
|
15
|
+
include = ["~DEFAULT_BRANCH"]
|
|
16
|
+
exclude = []
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
rules {
|
|
21
|
+
deletion = true
|
|
22
|
+
non_fast_forward = true
|
|
23
|
+
|
|
24
|
+
pull_request {
|
|
25
|
+
required_approving_review_count = 1
|
|
26
|
+
dismiss_stale_reviews_on_push = true
|
|
27
|
+
require_code_owner_review = true
|
|
28
|
+
require_last_push_approval = true
|
|
29
|
+
required_review_thread_resolution = true
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
required_status_checks {
|
|
33
|
+
strict_required_status_checks_policy = true
|
|
34
|
+
|
|
35
|
+
required_check {
|
|
36
|
+
context = "lint"
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
required_check {
|
|
40
|
+
context = "unit-tests"
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
required_check {
|
|
44
|
+
context = "check-links"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 4,
|
|
3
|
+
"terraform_version": "1.15.8",
|
|
4
|
+
"serial": 12,
|
|
5
|
+
"lineage": "4f560238-80a4-c310-1ede-68f245594cb1",
|
|
6
|
+
"outputs": {},
|
|
7
|
+
"resources": [
|
|
8
|
+
{
|
|
9
|
+
"mode": "managed",
|
|
10
|
+
"type": "github_actions_repository_permissions",
|
|
11
|
+
"name": "wayfarer",
|
|
12
|
+
"provider": "provider[\"registry.terraform.io/integrations/github\"]",
|
|
13
|
+
"instances": [
|
|
14
|
+
{
|
|
15
|
+
"schema_version": 0,
|
|
16
|
+
"attributes": {
|
|
17
|
+
"allowed_actions": "selected",
|
|
18
|
+
"allowed_actions_config": [
|
|
19
|
+
{
|
|
20
|
+
"github_owned_allowed": true,
|
|
21
|
+
"patterns_allowed": [],
|
|
22
|
+
"verified_allowed": false
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"enabled": true,
|
|
26
|
+
"id": "wayfarer",
|
|
27
|
+
"repository": "wayfarer",
|
|
28
|
+
"sha_pinning_required": false
|
|
29
|
+
},
|
|
30
|
+
"sensitive_attributes": [],
|
|
31
|
+
"identity_schema_version": 0,
|
|
32
|
+
"private": "bnVsbA==",
|
|
33
|
+
"dependencies": [
|
|
34
|
+
"github_repository.wayfarer"
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"mode": "managed",
|
|
41
|
+
"type": "github_repository",
|
|
42
|
+
"name": "wayfarer",
|
|
43
|
+
"provider": "provider[\"registry.terraform.io/integrations/github\"]",
|
|
44
|
+
"instances": [
|
|
45
|
+
{
|
|
46
|
+
"schema_version": 1,
|
|
47
|
+
"attributes": {
|
|
48
|
+
"allow_auto_merge": false,
|
|
49
|
+
"allow_forking": true,
|
|
50
|
+
"allow_merge_commit": false,
|
|
51
|
+
"allow_rebase_merge": false,
|
|
52
|
+
"allow_squash_merge": true,
|
|
53
|
+
"allow_update_branch": false,
|
|
54
|
+
"archive_on_destroy": null,
|
|
55
|
+
"archived": false,
|
|
56
|
+
"auto_init": false,
|
|
57
|
+
"default_branch": "master",
|
|
58
|
+
"delete_branch_on_merge": true,
|
|
59
|
+
"description": "Versatile web crawling on top of ActiveJob.",
|
|
60
|
+
"etag": "W/\"24cb3f207da49d273d9c9d77405235c03aa3822f48947356ec65cda4f564d968\"",
|
|
61
|
+
"fork": "false",
|
|
62
|
+
"full_name": "bauerd/wayfarer",
|
|
63
|
+
"git_clone_url": "git://github.com/bauerd/wayfarer.git",
|
|
64
|
+
"gitignore_template": null,
|
|
65
|
+
"has_discussions": false,
|
|
66
|
+
"has_downloads": false,
|
|
67
|
+
"has_issues": false,
|
|
68
|
+
"has_projects": false,
|
|
69
|
+
"has_wiki": false,
|
|
70
|
+
"homepage_url": "https://bauerd.github.io/wayfarer/",
|
|
71
|
+
"html_url": "https://github.com/bauerd/wayfarer",
|
|
72
|
+
"http_clone_url": "https://github.com/bauerd/wayfarer.git",
|
|
73
|
+
"id": "wayfarer",
|
|
74
|
+
"ignore_vulnerability_alerts_during_read": false,
|
|
75
|
+
"is_template": false,
|
|
76
|
+
"license_template": null,
|
|
77
|
+
"merge_commit_message": "PR_TITLE",
|
|
78
|
+
"merge_commit_title": "MERGE_MESSAGE",
|
|
79
|
+
"name": "wayfarer",
|
|
80
|
+
"node_id": "R_kgDOGHhJKg",
|
|
81
|
+
"pages": [],
|
|
82
|
+
"primary_language": "Ruby",
|
|
83
|
+
"private": true,
|
|
84
|
+
"repo_id": 410536234,
|
|
85
|
+
"security_and_analysis": [
|
|
86
|
+
{
|
|
87
|
+
"advanced_security": [],
|
|
88
|
+
"code_security": [],
|
|
89
|
+
"secret_scanning": [
|
|
90
|
+
{
|
|
91
|
+
"status": "disabled"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"secret_scanning_ai_detection": [],
|
|
95
|
+
"secret_scanning_non_provider_patterns": [],
|
|
96
|
+
"secret_scanning_push_protection": [
|
|
97
|
+
{
|
|
98
|
+
"status": "disabled"
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"source_owner": "",
|
|
104
|
+
"source_repo": "",
|
|
105
|
+
"squash_merge_commit_message": "COMMIT_MESSAGES",
|
|
106
|
+
"squash_merge_commit_title": "COMMIT_OR_PR_TITLE",
|
|
107
|
+
"ssh_clone_url": "git@github.com:bauerd/wayfarer.git",
|
|
108
|
+
"svn_url": "https://github.com/bauerd/wayfarer",
|
|
109
|
+
"template": [],
|
|
110
|
+
"topics": [
|
|
111
|
+
"activejob",
|
|
112
|
+
"ferrum",
|
|
113
|
+
"ruby",
|
|
114
|
+
"selenium",
|
|
115
|
+
"web-crawler"
|
|
116
|
+
],
|
|
117
|
+
"visibility": "private",
|
|
118
|
+
"vulnerability_alerts": true,
|
|
119
|
+
"web_commit_signoff_required": false
|
|
120
|
+
},
|
|
121
|
+
"sensitive_attributes": [],
|
|
122
|
+
"identity_schema_version": 0,
|
|
123
|
+
"private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ=="
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"mode": "managed",
|
|
129
|
+
"type": "github_repository_ruleset",
|
|
130
|
+
"name": "master",
|
|
131
|
+
"provider": "provider[\"registry.terraform.io/integrations/github\"]",
|
|
132
|
+
"instances": [
|
|
133
|
+
{
|
|
134
|
+
"schema_version": 1,
|
|
135
|
+
"attributes": {
|
|
136
|
+
"bypass_actors": [
|
|
137
|
+
{
|
|
138
|
+
"actor_id": 5,
|
|
139
|
+
"actor_type": "RepositoryRole",
|
|
140
|
+
"bypass_mode": "always"
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"conditions": [
|
|
144
|
+
{
|
|
145
|
+
"ref_name": [
|
|
146
|
+
{
|
|
147
|
+
"exclude": [],
|
|
148
|
+
"include": [
|
|
149
|
+
"~DEFAULT_BRANCH"
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
"enforcement": "active",
|
|
156
|
+
"etag": "W/\"3da14626c47fc6a5908a46038581b8c79ecbfaedf45e2f1c6530d92a431fa460\"",
|
|
157
|
+
"id": "19761353",
|
|
158
|
+
"name": "master",
|
|
159
|
+
"node_id": "RRS_lACqUmVwb3NpdG9yec4YeEkqzgEtiMk",
|
|
160
|
+
"repository": "wayfarer",
|
|
161
|
+
"rules": [
|
|
162
|
+
{
|
|
163
|
+
"branch_name_pattern": [],
|
|
164
|
+
"commit_author_email_pattern": [],
|
|
165
|
+
"commit_message_pattern": [],
|
|
166
|
+
"committer_email_pattern": [],
|
|
167
|
+
"copilot_code_review": [],
|
|
168
|
+
"creation": false,
|
|
169
|
+
"deletion": true,
|
|
170
|
+
"file_extension_restriction": [],
|
|
171
|
+
"file_path_restriction": [],
|
|
172
|
+
"max_file_path_length": [],
|
|
173
|
+
"max_file_size": [],
|
|
174
|
+
"merge_queue": [],
|
|
175
|
+
"non_fast_forward": true,
|
|
176
|
+
"pull_request": [
|
|
177
|
+
{
|
|
178
|
+
"allowed_merge_methods": [
|
|
179
|
+
"merge",
|
|
180
|
+
"squash",
|
|
181
|
+
"rebase"
|
|
182
|
+
],
|
|
183
|
+
"dismiss_stale_reviews_on_push": true,
|
|
184
|
+
"require_code_owner_review": true,
|
|
185
|
+
"require_last_push_approval": true,
|
|
186
|
+
"required_approving_review_count": 1,
|
|
187
|
+
"required_review_thread_resolution": true,
|
|
188
|
+
"required_reviewers": []
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
"required_code_scanning": [],
|
|
192
|
+
"required_deployments": [],
|
|
193
|
+
"required_linear_history": false,
|
|
194
|
+
"required_signatures": false,
|
|
195
|
+
"required_status_checks": [
|
|
196
|
+
{
|
|
197
|
+
"do_not_enforce_on_create": false,
|
|
198
|
+
"required_check": [
|
|
199
|
+
{
|
|
200
|
+
"context": "check-links",
|
|
201
|
+
"integration_id": 0
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"context": "lint",
|
|
205
|
+
"integration_id": 0
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"context": "unit-tests",
|
|
209
|
+
"integration_id": 0
|
|
210
|
+
}
|
|
211
|
+
],
|
|
212
|
+
"strict_required_status_checks_policy": true
|
|
213
|
+
}
|
|
214
|
+
],
|
|
215
|
+
"tag_name_pattern": [],
|
|
216
|
+
"update": false,
|
|
217
|
+
"update_allows_fetch_and_merge": false
|
|
218
|
+
}
|
|
219
|
+
],
|
|
220
|
+
"ruleset_id": 19761353,
|
|
221
|
+
"target": "branch"
|
|
222
|
+
},
|
|
223
|
+
"sensitive_attributes": [],
|
|
224
|
+
"identity_schema_version": 0,
|
|
225
|
+
"private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==",
|
|
226
|
+
"dependencies": [
|
|
227
|
+
"github_repository.wayfarer"
|
|
228
|
+
]
|
|
229
|
+
}
|
|
230
|
+
]
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"mode": "managed",
|
|
234
|
+
"type": "github_repository_vulnerability_alerts",
|
|
235
|
+
"name": "wayfarer",
|
|
236
|
+
"provider": "provider[\"registry.terraform.io/integrations/github\"]",
|
|
237
|
+
"instances": [
|
|
238
|
+
{
|
|
239
|
+
"schema_version": 0,
|
|
240
|
+
"attributes": {
|
|
241
|
+
"enabled": true,
|
|
242
|
+
"id": "410536234",
|
|
243
|
+
"repository": "wayfarer",
|
|
244
|
+
"repository_id": 410536234
|
|
245
|
+
},
|
|
246
|
+
"sensitive_attributes": [],
|
|
247
|
+
"identity_schema_version": 0,
|
|
248
|
+
"private": "bnVsbA==",
|
|
249
|
+
"dependencies": [
|
|
250
|
+
"github_repository.wayfarer"
|
|
251
|
+
]
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
}
|
|
255
|
+
],
|
|
256
|
+
"check_results": null
|
|
257
|
+
}
|
data/terraform/main.tf
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
provider "github" {
|
|
2
|
+
owner = var.owner
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
resource "github_repository" "wayfarer" {
|
|
6
|
+
name = var.repository
|
|
7
|
+
description = "Versatile web crawling on top of ActiveJob."
|
|
8
|
+
homepage_url = "https://bauerd.github.io/wayfarer/"
|
|
9
|
+
visibility = "private"
|
|
10
|
+
topics = ["ruby", "web-crawler", "activejob", "ferrum", "selenium"]
|
|
11
|
+
|
|
12
|
+
has_issues = false
|
|
13
|
+
has_projects = false
|
|
14
|
+
has_wiki = false
|
|
15
|
+
has_discussions = false
|
|
16
|
+
|
|
17
|
+
allow_merge_commit = false
|
|
18
|
+
allow_squash_merge = true
|
|
19
|
+
allow_rebase_merge = false
|
|
20
|
+
allow_auto_merge = false
|
|
21
|
+
delete_branch_on_merge = true
|
|
22
|
+
|
|
23
|
+
lifecycle {
|
|
24
|
+
ignore_changes = [pages]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
resource "github_repository_vulnerability_alerts" "wayfarer" {
|
|
29
|
+
repository = github_repository.wayfarer.name
|
|
30
|
+
enabled = true
|
|
31
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
variable "owner" {
|
|
2
|
+
type = string
|
|
3
|
+
description = "GitHub user or organization that owns the repository."
|
|
4
|
+
default = "bauerd"
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
variable "repository" {
|
|
8
|
+
type = string
|
|
9
|
+
description = "Repository name managed by this configuration."
|
|
10
|
+
default = "wayfarer"
|
|
11
|
+
}
|
data/wayfarer.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wayfarer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dominic Bauer
|
|
@@ -241,9 +241,11 @@ extensions: []
|
|
|
241
241
|
extra_rdoc_files: []
|
|
242
242
|
files:
|
|
243
243
|
- ".env"
|
|
244
|
+
- ".github/CODEOWNERS"
|
|
244
245
|
- ".github/actions/setup-mise/action.yaml"
|
|
245
246
|
- ".github/workflows/push.yaml"
|
|
246
247
|
- ".github/workflows/release.yaml"
|
|
248
|
+
- ".github/workflows/terraform.yaml"
|
|
247
249
|
- ".gitignore"
|
|
248
250
|
- ".rspec"
|
|
249
251
|
- ".rubocop.yml"
|
|
@@ -255,6 +257,7 @@ files:
|
|
|
255
257
|
- Gemfile
|
|
256
258
|
- Gemfile.lock
|
|
257
259
|
- LICENSE
|
|
260
|
+
- MAINTENANCE.md
|
|
258
261
|
- Rakefile
|
|
259
262
|
- bin/wayfarer
|
|
260
263
|
- docker-compose.yml
|
|
@@ -264,11 +267,11 @@ files:
|
|
|
264
267
|
- docs/cookbook/navigation.md
|
|
265
268
|
- docs/cookbook/querying_html.md
|
|
266
269
|
- docs/cookbook/screenshots.md
|
|
270
|
+
- docs/guides/architecture.md
|
|
267
271
|
- docs/guides/callbacks.md
|
|
268
272
|
- docs/guides/cli.md
|
|
269
273
|
- docs/guides/configuration.md
|
|
270
274
|
- docs/guides/debugging.md
|
|
271
|
-
- docs/guides/development.md
|
|
272
275
|
- docs/guides/handlers.md
|
|
273
276
|
- docs/guides/index.md
|
|
274
277
|
- docs/guides/jobs.md
|
|
@@ -287,6 +290,7 @@ files:
|
|
|
287
290
|
- docs/guides/user_agents.md
|
|
288
291
|
- docs/index.md
|
|
289
292
|
- docs/reference/api/route.md
|
|
293
|
+
- examples/open_systems.rb
|
|
290
294
|
- lib/wayfarer.rb
|
|
291
295
|
- lib/wayfarer/base.rb
|
|
292
296
|
- lib/wayfarer/batch_completion.rb
|
|
@@ -355,6 +359,7 @@ files:
|
|
|
355
359
|
- rake/docs.rake
|
|
356
360
|
- rake/lint.rake
|
|
357
361
|
- rake/release.rake
|
|
362
|
+
- rake/terraform.rake
|
|
358
363
|
- rake/tests.rake
|
|
359
364
|
- requirements.txt
|
|
360
365
|
- spec/factories/job.rb
|
|
@@ -433,6 +438,14 @@ files:
|
|
|
433
438
|
- spec/wayfarer/task_spec.rb
|
|
434
439
|
- spec/wayfarer/uri/normalization_spec.rb
|
|
435
440
|
- spec/wayfarer_spec.rb
|
|
441
|
+
- terraform/.gitignore
|
|
442
|
+
- terraform/.terraform.lock.hcl
|
|
443
|
+
- terraform/actions.tf
|
|
444
|
+
- terraform/branch_protection.tf
|
|
445
|
+
- terraform/github.tfstate
|
|
446
|
+
- terraform/main.tf
|
|
447
|
+
- terraform/variables.tf
|
|
448
|
+
- terraform/versions.tf
|
|
436
449
|
- wayfarer.gemspec
|
|
437
450
|
homepage: http://github.com/bauerd/wayfarer
|
|
438
451
|
licenses:
|