Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interpet and expose Secure Notes #16

Merged
merged 2 commits into from
Oct 27, 2020

Conversation

saraid
Copy link
Contributor

@saraid saraid commented Oct 26, 2020

Hello,

I store some files as Secure Notes and would like to be able to access them using Ruby. This seemed like the best way to do that. I tried to follow your style and design choices, but if there's anything you'd like done differently, please let me know.

I'm not confident in my ability to modify the test data to include Secure Notes, so I haven't touched the tests.

@coveralls
Copy link

coveralls commented Oct 26, 2020

Coverage Status

Coverage decreased (-0.8%) to 94.058% when pulling 4313409 on saraid:saraid/add-secure-notes into 4d9241a on detunized:master.

@detunized
Copy link
Owner

detunized commented Oct 27, 2020 via email

@saraid
Copy link
Contributor Author

saraid commented Oct 27, 2020

Sure.

From the Vault,

  1. I click "Notes" in the left sidebar, then
  2. I click the "+" in the bottom right corner.

This lets me give my note an arbitrary name and folder, as shown here:

Screen Shot 2020-10-27 at 11 36 27 AM

(Tue 11:38:21):~/Developer/github/lastpass-ruby [saraid/add-secure-notes] % bundle exec irb
irb(main):001:0> load 'lib/lastpass.rb'
=> true
irb(main):002:0> vault = LastPass::Vault.open_remote ENV['LASTPASS_USER'], ENV['LASTPASS_PASS']; nil
=> nil
irb(main):003:0> vault.notes.find { |n| n.name == 'test test' }.notes
=> "just a note"

@saraid
Copy link
Contributor Author

saraid commented Oct 27, 2020

As an aside, all accounts have a "Notes" field; this is something already parsed by Parser.parse_ACCT: but it's dropped when you build the Account object. I chose not to change this, since I wasn't sure about your design decision, but you could pretty easily change that if you wanted.

@detunized
Copy link
Owner

As an aside, all accounts have a "Notes" field; this is something already parsed by Parser.parse_ACCT: but it's dropped when you build the Account object. I chose not to change this, since I wasn't sure about your design decision, but you could pretty easily change that if you wanted.

This is an oversight. For a while I have not been looking into this library. I'm mainly busy with a grand-grand-son of this library https://github.com/detunized/password-manager-access. I just realized there I'm also discarding them. Thanks for the tip. I can fix that.

@detunized
Copy link
Owner

Merged. Thanks for the PR! I'll release this soon and will let you know.

@detunized detunized merged commit 894119f into detunized:master Oct 27, 2020
@saraid
Copy link
Contributor Author

saraid commented Oct 27, 2020

Thank you very much!

@detunized
Copy link
Owner

@saraid, version 1.7.0 pushed to RubyGems. I also added the @notes property to the Account class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants