docs: update vimdoc for sync refactor, remove demo scripts

Problem: Docs still referenced openssl dependency, defaulting to `sync`
action, and the `calendar` config field. Demo scripts used the old
singleton `store` API.

Solution: Update vimdoc and README to reflect explicit actions, per-
category calendars, and pure-Lua PKCE. Remove stale demo scripts and
update sync specs to match new behavior.
This commit is contained in:
Barrett Ruth 2026-03-05 11:24:43 -05:00
parent 9a762a5320
commit bc2a106617
6 changed files with 42 additions and 110 deletions

View file

@ -49,27 +49,27 @@ describe('sync', function()
assert.are.equal("gcal backend has no 'notreal' action", msg)
end)
it('defaults to sync action when action is omitted', function()
local called = false
local gcal = require('pending.sync.gcal')
local orig_sync = gcal.sync
gcal.sync = function()
called = true
it('lists actions when action is omitted', function()
local msg = nil
local orig = vim.notify
vim.notify = function(m)
msg = m
end
pending.command('gcal')
gcal.sync = orig_sync
assert.is_true(called)
vim.notify = orig
assert.is_not_nil(msg)
assert.is_truthy(msg:find('push'))
end)
it('routes explicit sync action', function()
it('routes explicit push action', function()
local called = false
local gcal = require('pending.sync.gcal')
local orig_sync = gcal.sync
gcal.sync = function()
local orig_push = gcal.push
gcal.push = function()
called = true
end
pending.command('gcal sync')
gcal.sync = orig_sync
pending.command('gcal push')
gcal.push = orig_push
assert.is_true(called)
end)
@ -90,10 +90,10 @@ describe('sync', function()
config.reset()
vim.g.pending = {
data_path = tmpdir .. '/tasks.json',
sync = { gcal = { calendar = 'NewStyle' } },
sync = { gcal = { client_id = 'test-id' } },
}
local cfg = config.get()
assert.are.equal('NewStyle', cfg.sync.gcal.calendar)
assert.are.equal('test-id', cfg.sync.gcal.client_id)
end)
describe('gcal module', function()
@ -107,9 +107,9 @@ describe('sync', function()
assert.are.equal('function', type(gcal.auth))
end)
it('has sync function', function()
it('has push function', function()
local gcal = require('pending.sync.gcal')
assert.are.equal('function', type(gcal.sync))
assert.are.equal('function', type(gcal.push))
end)
it('has health function', function()