Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
a45d577
Move Astro code to its own directory
Chalarangelo Jun 14, 2024
932a000
Set up Ruby version
Chalarangelo Jun 14, 2024
aa7fe99
Update .gitattributes
Chalarangelo Jun 14, 2024
771d511
Initialize Rails project
Chalarangelo Jun 14, 2024
939a5d6
Update .gitignore
Chalarangelo Jun 14, 2024
f3a2bd0
Database migrations
Chalarangelo Jun 14, 2024
1f0e73c
Initial model setup
Chalarangelo Jun 14, 2024
e2181c0
Add content import rake task
Chalarangelo Jun 14, 2024
cde8102
Initialize sqlite database
Chalarangelo Jun 14, 2024
3eb7fd2
Create parsley
Chalarangelo Jun 17, 2024
0019aa3
Move search to own directory
Chalarangelo Jun 17, 2024
420577a
Create BreadcrumbPresenter
Chalarangelo Jun 19, 2024
455066d
Create BaseSerializer
Chalarangelo Jun 19, 2024
e38ca3f
Make MarkdownParser async
Chalarangelo Jun 21, 2024
0d54bfa
Optimize snippet parsing
Chalarangelo Jun 21, 2024
a63736f
Add dateModified to collectionSnippet
Chalarangelo Jun 21, 2024
ed7d1b5
Rename cover in collection
Chalarangelo Jun 21, 2024
71ed7b1
Remove unused config exports
Chalarangelo Jun 21, 2024
4d04d3e
Create CoverPresenter
Chalarangelo Jun 21, 2024
f24de7e
Create serializable concern
Chalarangelo Jun 21, 2024
3d3fec6
Create with_cover concern
Chalarangelo Jun 21, 2024
3c92cf3
Create common API for snippets & collections
Chalarangelo Jun 21, 2024
2925648
Create basic serializers
Chalarangelo Jun 21, 2024
99a5946
Add TagFormatter lib
Chalarangelo Jun 21, 2024
f618bf5
Add class extension initializer
Chalarangelo Jun 21, 2024
dccb154
Add SearchIndex lib
Chalarangelo Jun 21, 2024
7925f39
Update models
Chalarangelo Jun 21, 2024
73ed013
Add basic page serializer
Chalarangelo Jun 21, 2024
6105941
Create settings
Chalarangelo Jun 23, 2024
5ec7400
Add cover_full_url method
Chalarangelo Jun 23, 2024
4bfe687
Add additional methods to common api
Chalarangelo Jun 23, 2024
442cc7a
Increase performance of breadcrumbs
Chalarangelo Jun 23, 2024
0403f3a
Optimize parent querying for collections
Chalarangelo Jun 23, 2024
be1d0a6
Cache main collection for performance
Chalarangelo Jun 23, 2024
0ad8fb3
Add page adapters
Chalarangelo Jun 23, 2024
e9c9586
Add recommendation presenter
Chalarangelo Jun 23, 2024
19479e7
Add settings for snippets per page
Chalarangelo Jun 23, 2024
5efca89
Add CollectionContextSerializer
Chalarangelo Jun 23, 2024
013600f
Add PageSerializer
Chalarangelo Jun 23, 2024
ab88488
Create sublink presenter
Chalarangelo Jun 23, 2024
cc6deea
Add leftover logic for snippets
Chalarangelo Jun 23, 2024
02ecf60
Create home page adapter
Chalarangelo Jun 28, 2024
d7dbfa6
Tidy up code in page adapters
Chalarangelo Jun 28, 2024
628d682
Memoize common api methods
Chalarangelo Jun 28, 2024
7ac7d50
Parse collections page with Parsley
Chalarangelo Jun 28, 2024
6cd02a9
Fix import task description
Chalarangelo Jun 28, 2024
d0d79fa
Add handling for collections collection
Chalarangelo Jun 28, 2024
7ba8274
Add presentation settings
Chalarangelo Jun 28, 2024
5cad7a9
Fix discrepancies in presentation
Chalarangelo Jun 28, 2024
f0f4628
Add a slug for collections page (hub)
Chalarangelo Jun 28, 2024
7839585
Tidy up serializer code
Chalarangelo Jul 3, 2024
ca5ea44
Add previewable concern
Chalarangelo Jul 3, 2024
7a1ed63
Make key search respond to trailing slashes
Chalarangelo Jul 3, 2024
cfc84bb
Delegate preview to Previewable
Chalarangelo Jul 3, 2024
daf2c53
Improve performance of breadcrumb presenter
Chalarangelo Jul 3, 2024
4ffa777
Optimize performance of recommendations
Chalarangelo Jul 3, 2024
4101893
Optimize recommendation_presenter
Chalarangelo Jul 4, 2024
ff16f05
Add indices for snippets
Chalarangelo Jul 4, 2024
ba319bc
Exclude collections collection from collection snippets
Chalarangelo Jul 4, 2024
e9ed0d8
Add processed assets
Chalarangelo Jul 10, 2024
fc2b659
Remove old language icons
Chalarangelo Jul 10, 2024
3407fb5
Add icons
Chalarangelo Jul 10, 2024
f38a0a4
Add asset processing to Parsley
Chalarangelo Jul 10, 2024
5cbb2e1
Refactor Parsley command line tool
Chalarangelo Jul 10, 2024
4569748
Add RSS feed generation
Chalarangelo Jul 10, 2024
33d3e3c
Add sitemap generation
Chalarangelo Jul 10, 2024
c1b5387
Tidy up search and tags
Chalarangelo Jul 10, 2024
b2cd909
Extend string methods
Chalarangelo Jul 10, 2024
69e033d
Extract settings for paths
Chalarangelo Jul 10, 2024
111a5f5
Introduce RedirectGenerator
Chalarangelo Jul 10, 2024
189571b
Add rake tasks for auxiliary files
Chalarangelo Jul 10, 2024
da7361b
Add AstroContentGenerator
Chalarangelo Jul 10, 2024
6f7a41e
Add export rake task
Chalarangelo Jul 10, 2024
7daf86d
Reorganize rake tasks
Chalarangelo Jul 10, 2024
860c2b0
Remove storage (DB) files
Chalarangelo Jul 10, 2024
d11c64d
Remove redundant scripts
Chalarangelo Jul 10, 2024
b77f7ba
Add scope to Previewable
Chalarangelo Jul 10, 2024
a6e8f0d
Tidy up page adapters
Chalarangelo Jul 10, 2024
d8b4522
Cache counts on Collection
Chalarangelo Jul 10, 2024
cbc0c10
Tidy up Collection model
Chalarangelo Jul 10, 2024
292df78
Tidy up Snippet model
Chalarangelo Jul 10, 2024
e899d7f
Change predev command
Chalarangelo Jul 10, 2024
07a5eec
Move deploy script to bin
Chalarangelo Jul 10, 2024
00ede10
Integrate content creator into parsley
Chalarangelo Jul 10, 2024
31af5b1
Remove redundant JS files
Chalarangelo Jul 10, 2024
2583792
Fix incorrect snippet references in collections
Chalarangelo Jul 11, 2024
fb88a2e
Respect snippetIds sorting
Chalarangelo Jul 11, 2024
28d197b
Fix name of context attribute
Chalarangelo Jul 11, 2024
f775a94
Fix Collection#formatted_description
Chalarangelo Jul 11, 2024
937efbe
Fix Snippet#formatted_tags
Chalarangelo Jul 11, 2024
ea2abbc
Tidy up CoverPresenter logic
Chalarangelo Jul 11, 2024
12904c9
Order collection sublinks
Chalarangelo Jul 11, 2024
58e9372
Reorder collection attributes
Chalarangelo Jul 11, 2024
314bc36
Ensure snippet context has correct cover
Chalarangelo Jul 11, 2024
c12e056
Ensure page output path exists
Chalarangelo Jul 11, 2024
034e18f
Reorganize scripts and rake tasks
Chalarangelo Jul 11, 2024
0c8a254
Sort search index
Chalarangelo Jul 11, 2024
65e3c7a
Move settings into Astro
Chalarangelo Jul 11, 2024
3f857dd
Nest utils into parsley
Chalarangelo Jul 11, 2024
434b481
Delete the last blocks
Chalarangelo Jul 11, 2024
d0eeebd
Uninstall unused node modules
Chalarangelo Jul 11, 2024
6a37192
Make listed frontmatter prop mandatory
Chalarangelo Jul 16, 2024
e957f2f
Update collection frontmatter
Chalarangelo Jul 16, 2024
c70f0fd
Combine migrations
Chalarangelo Jul 16, 2024
614f814
Make excerpt frontmatter prop mandatory
Chalarangelo Jul 16, 2024
cb1fe7f
Update parsley to match structural changes
Chalarangelo Jul 16, 2024
f437639
Move formatted_description to common api
Chalarangelo Jul 16, 2024
73be671
Tidy up collection model
Chalarangelo Jul 16, 2024
8f36293
Tidy up snippet model
Chalarangelo Jul 16, 2024
aacaf41
Use updated attributes in presenters
Chalarangelo Jul 16, 2024
510647b
Tidy up adapters and serializers
Chalarangelo Jul 16, 2024
9cf6e70
Update Astro components and pages
Chalarangelo Jul 16, 2024
f306bd8
Define and use preview_title
Chalarangelo Jul 16, 2024
e9084b5
Clean up serializer clutter
Chalarangelo Jul 16, 2024
577dc3e
Add imported performance data path
Chalarangelo Jul 17, 2024
bd53e27
Update redirects code
Chalarangelo Jul 17, 2024
0b1f31c
List all available snippet covers
Chalarangelo Jul 17, 2024
c1ac1d1
Fix missing delegation
Chalarangelo Jul 17, 2024
00f3085
Add logic to retrieve redirection slugs
Chalarangelo Jul 17, 2024
588e044
Add PerformanceTracking
Chalarangelo Jul 17, 2024
b4097a2
Add PreparedQueries
Chalarangelo Jul 17, 2024
39c454e
Initial setup for .irbrc
Chalarangelo Jul 17, 2024
057fbf5
Move assets to public directory
Chalarangelo Jul 17, 2024
d8ddd98
Make parsley assets output to public
Chalarangelo Jul 17, 2024
24d51b6
Install and setup rspec
Chalarangelo Jul 17, 2024
10ff17a
Add specs for lib/ext/string
Chalarangelo Jul 17, 2024
f9ed378
Clean lefotver TODO: notes
Chalarangelo Jul 17, 2024
25156ae
Install factory_bot_rails
Chalarangelo Jul 18, 2024
fdf2fc6
Add seeds for testing
Chalarangelo Jul 18, 2024
62fa83d
Load seeds and factories in rspec
Chalarangelo Jul 18, 2024
af61a0d
Create factories
Chalarangelo Jul 18, 2024
7ed71f4
Fix public assets paths
Chalarangelo Jul 18, 2024
bfa87c1
Make slug_id part of the common api
Chalarangelo Jul 18, 2024
0e9a798
Extract and use context from serializable
Chalarangelo Jul 18, 2024
380cca2
Update collections factory
Chalarangelo Jul 18, 2024
d3f129b
Add strip_html method
Chalarangelo Jul 18, 2024
359fd9a
Fix seo_description
Chalarangelo Jul 18, 2024
43650b1
Memoize siblings on Collection
Chalarangelo Jul 18, 2024
b8fde42
Add specs for models
Chalarangelo Jul 18, 2024
b68a285
Add specs for concerns
Chalarangelo Jul 18, 2024
a71cab5
Add specs for presenters
Chalarangelo Jul 18, 2024
e918f0d
Add specs for base_serializer
Chalarangelo Jul 18, 2024
7834fb0
Install vitest
Chalarangelo Jul 24, 2024
7b68a7b
Add content fixtures
Chalarangelo Jul 24, 2024
3e772d7
Add Parsley mock config
Chalarangelo Jul 24, 2024
48e179b
Test parsley utils
Chalarangelo Jul 24, 2024
e9413e6
Test parsley ranker
Chalarangelo Jul 24, 2024
8dae0e0
Test parsley toc reader
Chalarangelo Jul 24, 2024
3de66bc
Test parsley's prepareContent
Chalarangelo Jul 24, 2024
c36d3ab
Update dictionary
Chalarangelo Jul 24, 2024
ebce5d5
Install rubocop
Chalarangelo Jul 25, 2024
99d4b04
Configure rubocop
Chalarangelo Jul 25, 2024
3cb7c39
Run Rubocop on all Ruby files
Chalarangelo Jul 25, 2024
868a041
Rename description to content
Chalarangelo Jul 25, 2024
73d83c9
Rename short_description to description
Chalarangelo Jul 25, 2024
e53991c
Ignore SQLite databases
Chalarangelo Jul 25, 2024
48579a2
Ignore manifest.js
Chalarangelo Jul 25, 2024
1405ebc
Fix extensions loading
Chalarangelo Jul 25, 2024
de27497
Add test workflow (GitHub Actions)
Chalarangelo Jul 25, 2024
8481ba2
Add ruby to codeql-analysis
Chalarangelo Jul 25, 2024
ff94aaa
Upgrade CodeQL action to v2
Chalarangelo Jul 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 9 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
package-lock.json -diff
# Mark files as having been generated.
package-lock.json linguist-generated
Gemfile.lock linguist-generated
db/schema.rb linguist-generated

# Mark any vendored files as having been vendored.
vendor/* linguist-vendored
config/credentials/*.yml.enc diff=rails_credentials
config/credentials.yml.enc diff=rails_credentials
7 changes: 4 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,18 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
language: [ 'javascript', 'ruby' ]

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2

4 changes: 2 additions & 2 deletions .github/workflows/deploy-production-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ jobs:
DEPLOY_TRIGGER: ${{ github.event_name }}
if: steps.filter.outputs.web == 'true'
run: |
chmod +x ./src/scripts/deploy.sh
./src/scripts/deploy.sh production
chmod +x ./bin/deploy
./bin/deploy production
4 changes: 2 additions & 2 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ jobs:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
DEPLOY_TRIGGER: ${{ github.event_name }}
run: |
chmod +x ./src/scripts/deploy.sh
./src/scripts/deploy.sh production
chmod +x ./bin/deploy
./bin/deploy production
40 changes: 40 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Run tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
js_tests:
name: 'Node.js ${{ matrix.node-version }} tests'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.11.1]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test

rspec_tests:
name: 'Ruby ${{ matrix.ruby-version }} tests'
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: [3.3.3]
env:
RAILS_ENV: test
steps:
- uses: actions/checkout@v4
- name: Use Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- run: gem install bundler
- run: bundle install
- run: rake db:test:prepare
- run: bundle exec rspec
14 changes: 12 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ test_old/
coverage/

# Logs
/log/*
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Tempfiles
/tmp/*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

Expand Down Expand Up @@ -77,6 +81,8 @@ yarn-error.log
.yarn-integrity

# dotenv environment variables file
/.env*
!/.env*.erb
.env

# parcel-bundler cache (https://parceljs.org/)
Expand Down Expand Up @@ -109,7 +115,6 @@ out/

# gatsby files
.cache/
public

# Mac files
.DS_Store
Expand All @@ -130,7 +135,6 @@ dist/
.assets
.content
content/data
public/assets
public/sitemap.xml
public/feed.xml
public/chirp.json
Expand All @@ -140,3 +144,9 @@ snippet.png

# Imported files for development
imported/

# Storage (SQLite databases)
/storage/*

# Master key for decrypting credentials
/config/master.key
7 changes: 7 additions & 0 deletions .irbrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
PreparedQueries.instance_methods.each do |method|
define_method(method) do |*args|
PreparedQueries.instance_method(method).bind_call(self, *args)
end
end

# More ideas here: https://medium.com/simply-dev/do-more-with-rails-console-by-configuring-irbrc-e5c25284305d
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--require spec_helper
Loading