From 9dcd2556ba3453d05c19c0f499bdf02d099ea140 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 30 Apr 2021 15:30:43 +0200 Subject: [PATCH] Rename list module to files module Renamed to 'files.lua' since it is the only module actively working on the underlying filesystem so far -- gathering existing files and zettel in the directories. --- lua/zettelkasten/action.lua | 2 +- lua/zettelkasten/action_spec.lua | 2 +- lua/zettelkasten/{list.lua => files.lua} | 0 lua/zettelkasten/{list_spec.lua => files_spec.lua} | 2 +- lua/zettelkasten/init.lua | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename lua/zettelkasten/{list.lua => files.lua} (100%) rename lua/zettelkasten/{list_spec.lua => files_spec.lua} (99%) diff --git a/lua/zettelkasten/action.lua b/lua/zettelkasten/action.lua index adc4e82..215b68d 100644 --- a/lua/zettelkasten/action.lua +++ b/lua/zettelkasten/action.lua @@ -2,7 +2,7 @@ local A = {} local o = require 'zettelkasten.options' local link = require 'zettelkasten.link' -local list = require 'zettelkasten.list' +local list = require 'zettelkasten.files' local BIGNUMBER = 10000000 diff --git a/lua/zettelkasten/action_spec.lua b/lua/zettelkasten/action_spec.lua index cffeca7..4a5a0c8 100644 --- a/lua/zettelkasten/action_spec.lua +++ b/lua/zettelkasten/action_spec.lua @@ -19,7 +19,7 @@ describe("open", function() end) it("should use the anchor to open the corresponding zettel", function() vim.api = {nvim_command = mock(function() end)} - local ls = stub(require 'zettelkasten.list', "get_zettel") + local ls = stub(require 'zettelkasten.files', "get_zettel") action.open({ ref = "1910271456_link-to-my-file.md", diff --git a/lua/zettelkasten/list.lua b/lua/zettelkasten/files.lua similarity index 100% rename from lua/zettelkasten/list.lua rename to lua/zettelkasten/files.lua diff --git a/lua/zettelkasten/list_spec.lua b/lua/zettelkasten/files_spec.lua similarity index 99% rename from lua/zettelkasten/list_spec.lua rename to lua/zettelkasten/files_spec.lua index cd02dfc..770b3e1 100644 --- a/lua/zettelkasten/list_spec.lua +++ b/lua/zettelkasten/files_spec.lua @@ -1,4 +1,4 @@ -local ls = require 'zettelkasten.list' +local ls = require 'zettelkasten.files' -- these tests, I suppose, only work on unix due to the file structure local function simple_api_mock(files) diff --git a/lua/zettelkasten/init.lua b/lua/zettelkasten/init.lua index ef74c11..0824ef7 100644 --- a/lua/zettelkasten/init.lua +++ b/lua/zettelkasten/init.lua @@ -1,6 +1,6 @@ local ZK = {} -local ls = require 'zettelkasten.list' +local ls = require 'zettelkasten.files' local o = require 'zettelkasten.options' local anchor = require 'zettelkasten.anchor' local action = require 'zettelkasten.action'