unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* RFC: feature/auth-source-pass branch integrating auth-source with the pass secret manager
@ 2017-03-27 17:45 Ted Zlatanov
  2017-03-28 20:26 ` Noam Postavsky
  0 siblings, 1 reply; 4+ messages in thread
From: Ted Zlatanov @ 2017-03-27 17:45 UTC (permalink / raw)
  To: emacs-devel

Working with Damien Cassou and others, I've pushed a proposed series of
patches from https://github.com/DamienCassou/emacs/pull/1 to the branch
feature/auth-source-pass

From the Emacs maintenance side, this code comes with tests. On the
auth-source library side, the code adds hooks to make future additions
to auth-source backends a bit easier.

The copyright assignments are in order so I believe this is OK to merge.
Please comment on the code, if you have any questions or concerns.

Thanks!
Ted




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: RFC: feature/auth-source-pass branch integrating auth-source with the pass secret manager
  2017-03-27 17:45 RFC: feature/auth-source-pass branch integrating auth-source with the pass secret manager Ted Zlatanov
@ 2017-03-28 20:26 ` Noam Postavsky
  2017-04-26 19:20   ` Ted Zlatanov
  0 siblings, 1 reply; 4+ messages in thread
From: Noam Postavsky @ 2017-03-28 20:26 UTC (permalink / raw)
  To: Emacs developers

On Mon, Mar 27, 2017 at 1:45 PM, Ted Zlatanov <tzz@lifelogs.com> wrote:
> Please comment on the code, if you have any questions or concerns.

+(defun auth-source-pass--remove-directory-name (name)
+  "Remove directories from NAME.
+E.g., if NAME is \"foo/bar\", return \"bar\"."
+  (replace-regexp-in-string ".*/" "" name))

This could be replaced with `file-name-nondirectory', I think.

+(defun auth-source-pass--should-have-message-containing (regexp)
+  "Assert that at least one `auth-source-do-debug` matched REGEXP."
+  (should (seq-find (lambda (message)
+                      (string-match regexp message))
+                    auth-source-pass--debug-log)))

The reliance on debug prints for the tests seems a bit strange to me
(I don't really have a better suggestion though).

+(defmacro auth-source-pass--deftest (name arglist store &rest body)
+  "Define a new ert-test NAME with ARGLIST using STORE as password-store.
+BODY is a sequence of instructions that will be evaluated.
+
+This macro overrides `auth-source-pass-parse-entry' and
`auth-source-pass-entries' to
+test code without touching the file system."

I would suggest rather defining auth-source-pass--with-store, and
leaving the test defining part to ert-deftest.

So that, e.g.,

(auth-source-pass--deftest auth-source-pass-find-match-matching-at-entry-name ()
           '(("foo"))
  (should (equal (auth-source-pass--find-match "foo" nil)
                 "foo")))

becomes

(ert-deftest auth-source-pass-find-match-matching-at-entry-name ()
  (auth-source-pass--with-store '(("foo"))
    (should (equal (auth-source-pass--find-match "foo" nil)
                   "foo"))))



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: RFC: feature/auth-source-pass branch integrating auth-source with the pass secret manager
  2017-03-28 20:26 ` Noam Postavsky
@ 2017-04-26 19:20   ` Ted Zlatanov
  2017-04-27 21:39     ` Ted Zlatanov
  0 siblings, 1 reply; 4+ messages in thread
From: Ted Zlatanov @ 2017-04-26 19:20 UTC (permalink / raw)
  To: emacs-devel

On Tue, 28 Mar 2017 16:26:30 -0400 Noam Postavsky <npostavs@users.sourceforge.net> wrote: 

NP> On Mon, Mar 27, 2017 at 1:45 PM, Ted Zlatanov <tzz@lifelogs.com> wrote:
>> Please comment on the code, if you have any questions or concerns.

Thanks for your comments, Noam.

Working with Damien Cassou I was able to collect the needed changes and
fixes, including the ones that addressed your review, into a few commits
in the feature/auth-source-pass branch. I believe the content and the
commit messages are good, and the contributors have signed the
assignment papers.

If there are no objections, I'll merge it in a day.

Thank you for your help!
Ted




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: RFC: feature/auth-source-pass branch integrating auth-source with the pass secret manager
  2017-04-26 19:20   ` Ted Zlatanov
@ 2017-04-27 21:39     ` Ted Zlatanov
  0 siblings, 0 replies; 4+ messages in thread
From: Ted Zlatanov @ 2017-04-27 21:39 UTC (permalink / raw)
  To: emacs-devel

On Wed, 26 Apr 2017 15:20:18 -0400 Ted Zlatanov <tzz@lifelogs.com> wrote: 

TZ> On Tue, 28 Mar 2017 16:26:30 -0400 Noam Postavsky <npostavs@users.sourceforge.net> wrote: 
NP> On Mon, Mar 27, 2017 at 1:45 PM, Ted Zlatanov <tzz@lifelogs.com> wrote:
>>> Please comment on the code, if you have any questions or concerns.

TZ> Thanks for your comments, Noam.

TZ> Working with Damien Cassou I was able to collect the needed changes and
TZ> fixes, including the ones that addressed your review, into a few commits
TZ> in the feature/auth-source-pass branch. I believe the content and the
TZ> commit messages are good, and the contributors have signed the
TZ> assignment papers.

TZ> If there are no objections, I'll merge it in a day.

This is now merged. Thank you, everyone who contributed with code and
reviews.

Ted




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-27 21:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-27 17:45 RFC: feature/auth-source-pass branch integrating auth-source with the pass secret manager Ted Zlatanov
2017-03-28 20:26 ` Noam Postavsky
2017-04-26 19:20   ` Ted Zlatanov
2017-04-27 21:39     ` Ted Zlatanov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).