https://github.com/ananace/ruby-passwordstate
Ruby module for communicating with a Passwordstate instance
https://github.com/ananace/ruby-passwordstate
passwordstate ruby
Last synced: over 1 year ago
JSON representation
Ruby module for communicating with a Passwordstate instance
- Host: GitHub
- URL: https://github.com/ananace/ruby-passwordstate
- Owner: ananace
- License: mit
- Created: 2018-07-17T14:12:49.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-03-27T09:18:27.000Z (over 2 years ago)
- Last Synced: 2025-03-03T11:19:10.170Z (over 1 year ago)
- Topics: passwordstate, ruby
- Language: Ruby
- Size: 141 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Passwordstate
A Ruby gem for communicating with a [Passwordstate](https://clickstudios.com.au/passwordstate.aspx) instance
The documentation for the development version can be found at https://iti.gitlab-pages.liu.se/ruby-passwordstate
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'passwordstate'
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install passwordstate
## Usage example
```ruby
require 'passwordstate'
client = Passwordstate::Client.new 'https://passwordstate.example.com', username: 'user', password: 'password'
# Passwordstate::Client.new 'https://passwordstate.example.com', apikey: 'key'
# #"application/json", "user-agent"=>"RubyPasswordstate/0.1.0"},
# @server_url=#,
# @timeout=15,
# @validate_certificate=true>
client.folders
# [#,
# #]
client.password_lists.get(7).passwords
# [#,
# #,
# #]
pw = client.password_lists.first.passwords.create title: 'example', user_name: 'someone', generate_password: true
# #
pw.password
# "millionfE2rMrcb2LngBTHnDyxdpsGSmK3"
pw.delete
# true
```
A larger - and much more convoluted - example can be found at https://github.com/ananace/foreman_passwordstate/
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/ananace/ruby-passwordstate
The project lives at https://gitlab.liu.se/ITI/ruby-passwordstate
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).