moss

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit b12ac0ff186c4a8b3eb96770645f2b0f37108059
parent 55ab71a7eed4ea32688ec5f80e5d3098f928fdd4
Author: Daniel Barlow <dan@telent.net>
Date:   Mon,  9 Aug 2021 22:56:46 +0100

delete trailing whitespace

Diffstat:
Mfeatures/moss.feature | 23++++++++++++++++-------
Mfeatures/step_definitions/steps.rb | 2+-
Mmoss.rb | 2+-
3 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/features/moss.feature b/features/moss.feature @@ -27,7 +27,7 @@ Feature: command-line password management When I list the secrets Then I see the string "work/gmail" And I see the string "home/yahoomail" - And I see the string "home/ebay" + And I see the string "home/ebay" Scenario: I can search for a secret Given I am using the example password store @@ -48,7 +48,7 @@ Feature: command-line password management | family | me.key,partner.key,child.key | | work | me.key,work.key | | private | me.key | - + When I store a secret for "private/medical" with content "120/70" Then I can decrypt it with key "me.key" to "120/70" And I cannot decrypt it with key "work.key" @@ -62,18 +62,27 @@ Feature: command-line password management Then I can decrypt it with key "me.key" to "isle of wight" And I can decrypt it with key "child.key" to "isle of wight" And I cannot decrypt it with key "work.key" - + Scenario: Secrets are stored in a git repo Given I am using a temporary password store And the store is version-controlled When I store a secret for "home/ebay" with content "horsebattery" Then the change to "home/ebay.age" is committed to version control - + + Scenario: I can do git operations on the store + Given I am using a temporary password store + And the store is version-controlled + When I store a secret for "home/ebay" with content "horsebattery" + Then I can run git "config --local -l" + And I see the string "core.bare=false" Scenario: Sensible path to the store Given I do not specify a store Then the store directory is under XDG_DATA_HOME - - - + Scenario: I can create a new store + Given I am using a temporary password store + When I create a moss instance with identity "me.key" + Then the instance store exists + And the instance identity is "me.key" + And the store root contains .recipients for the identity "me.key" diff --git a/features/step_definitions/steps.rb b/features/step_definitions/steps.rb @@ -96,7 +96,7 @@ When("I search for {string}") do |term| @i_see = shell "#{MOSS} search #{term}" end -When("I list the secrets") do +When("I list the secrets") do @i_see = shell "#{MOSS} list" end diff --git a/moss.rb b/moss.rb @@ -47,7 +47,7 @@ end def find_in_subtree(subtree, filename) pathname = subtree.join(filename) - case + case when pathname.readable? pathname when subtree.to_s > STORE.to_s