Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Toolchain versions (Ruby, Node, Postgres, pnpm) are pinned in `.tool-versions`;
- **Interactive console:** `rake console` (or `bin/rails console`).
- **Asset build (one-off):** `pnpm build` (JS via esbuild) and `pnpm build:css` (CSS via esbuild).

Feed operations are exposed as rake tasks: `rake fetch_feeds`, `rake fetch_feed[ID]`, `rake lazy_fetch`, `rake cleanup_old_stories[DAYS]` (default 30 days; removes read, unstarred stories).
Feed operations are exposed as rake tasks: `rake fetch_feeds`, `rake fetch_feed[ID]`, `rake cleanup_old_stories[DAYS]` (default 30 days; removes read, unstarred stories).

## Architecture

Expand Down Expand Up @@ -64,6 +64,10 @@ Gotchas:

ESLint, Stylelint, and RuboCop each use a generated "todo" baseline file (`.eslint_todo.ts`, `.stylelint_todo.yml`, `.rubocop_todo.yml`) that suppresses pre-existing offenses. The intent is to ratchet these down over time — fix offenses and remove their entries rather than adding new suppressions. Regenerate via `bundle exec exe/eslint_autogen` / `bundle exec exe/stylelint_autogen` (CI checks that the committed baseline matches). A custom RuboCop cop lives in `linters/rubocop/cop/`.

## Changelog

Stringer doesn't cut releases; people run whatever is on `main`. When a change matters to people running Stringer (a breaking change, a new or removed setting or rake task, a notable feature), add an entry to `CHANGELOG.md` under a heading for the date it lands on `main` (`## YYYY-MM-DD`, newest first). Reuse that day's heading if it already exists, and group entries under `### Breaking changes` etc. as needed. Skip internal changes like refactors, tests, and dependency bumps.

## CI

CircleCI (`.circleci/config.yml`) runs, in order: `tscheck`, eslint (incl. unused-rule check and autogen drift check), vitest, brakeman, stylelint (+ autogen drift), rubocop, then rspec (with `xvfb-run` for system specs). Match this locally before pushing.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Changelog

Changes that matter to people running Stringer, newest first. Each heading is
the date the change landed on `main`.

## 2026-11-28

### Breaking changes

- **Heroku: `rake lazy_fetch` removed.** If your Heroku Scheduler runs
`rake lazy_fetch`, change it to `rake fetch_feeds`. The old task only queued
jobs, so feeds didn't update while the web dyno was asleep
([#647](https://github.com/stringer-rss/stringer/issues/647)). You can also
remove the `APP_URL` setting.
14 changes: 0 additions & 14 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,6 @@ task fetch_feeds: :environment do
Feed::FetchAll.call
end

desc "Lazily fetch all feeds."
task lazy_fetch: :environment do
if ENV["APP_URL"]
uri = URI(ENV["APP_URL"])

# warm up server by fetching the root path
Net::HTTP.get_response(uri)
end

FeedRepository.list.each do |feed|
CallableJob.perform_later(Feed::FetchOne, feed)
end
end

desc "Fetch single feed"
task :fetch_feed, [:id] => :environment do |_t, args|
Feed::FetchOne.call(Feed.find(args[:id]))
Expand Down
8 changes: 0 additions & 8 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@
"ENFORCE_SSL": {
"description": "Force all clients to connect over SSL",
"value": "true"
},
"WORKER_EMBEDDED": {
"description": "Force worker threads to be spawned by main process",
"value": "true"
},
"WORKER_RETRY": {
"description": "Number of times to respawn the worker thread if it fails",
"value": "3"
}
},
"addons": [
Expand Down
2 changes: 1 addition & 1 deletion app/views/debug/heroku.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class Views::Debug::Heroku < Views::Base
SCHEDULER_TASK = <<~TEXT
Task: rake lazy_fetch
Task: rake fetch_feeds
Dyno Size: 1X
Frequency: Hourly
TEXT
Expand Down
4 changes: 1 addition & 3 deletions docs/Heroku.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@ heroku config:set ENCRYPTION_KEY_DERIVATION_SALT=`openssl rand -hex 64`

git push heroku main

heroku config:set APP_URL=`heroku apps:info --shell | grep web_url | cut -d= -f2`

heroku run rake db:migrate
heroku restart

heroku addons:create scheduler
heroku addons:open scheduler
```

Add an hourly task that runs `rake lazy_fetch` (if you are not on Heroku you may want `rake fetch_feeds` instead).
Add an hourly task that runs `rake fetch_feeds`.

Load the app and follow the instructions to import your feeds and start using the app.

Expand Down
2 changes: 1 addition & 1 deletion spec/system/heroku_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
it "displays the scheduler task instructions" do
visit("/heroku")

expect(page).to have_text("rake lazy_fetch")
expect(page).to have_text("rake fetch_feeds")
end

it "links to the home page" do
Expand Down
Loading