
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
Gertrude is your librarian. It's a simple rest service that feeds you unique items, that you define, by type. Those items are reserved until you release them back to the service.
As an example, this can be used to limit conflicts in users when testing. Testers (or automation) can request users from the service, and use them for testing. The service won't provide that specific user to another request, until the original requester releases it back to the service. Check your stuff back in to Gertrude. Dont be that guy.
Create a yaml file, using the following format:
---
item_type1:
  type1_item1:
    item1_property1: property1_value
    items1_property2: property2_value
  type1_item2:
    item2_property1: property1_value
    items2_property2: property2_value
Example (for an implementation to provide users):
---
admin:
  admin1:
    password: admin_password_1
    other: admin_other
  admin2:
    password: admin_password_2
    other: admin_other
  admin3:
    password: admin_password_3
    other: admin_other
basic:
  basic1:
  basic2:
  basic3:
custom_user:
  john_smith:
    password: jsmithpw
    rep_id: 8675309
    other_info:
      - foo
      - bar
          - baz
Alternately, you can replace the "all_items.yml" file in the repo with your yaml file, and then start the service.
Install the gem
$gem install gertrude
Start the service. In this example, we use rack:
$gertrude start -f path/to/yml
Routes are as follows (please replace with your host address, item type, and port)
See all available items, and their properties.
  http://0.0.0.0:8080/
Get a list of all items available for reservation
  http://0.0.0.0:8080/available
Reserve an item.
  http:/0.0.0.0:8080/reserve/item?type=admin
Gertrude will return you the requested item as a hash.
 {'admin1' => {'password' => 'admin_password_1', 'other' => 'admin_other'}
You can pass a timeout, in seconds (default is 30). Sometimes you have to wait for an item to become available.
  http://0.0.0.0:8080/reserve/item?type=admin&timeout=120
Get a list of all items that are currently reserved.
  http://0.0.0.0:8080/reserved
Enjoy your item, for however long you need to. Go ahead. Have a blast.
Release an item back to the service. You can't keep it forever.
  http://0.0.0.0:8080/release/item?item=admin1
Release all currently reserved items.
  http://0.0.0.0:8080/release
FAQs
Unknown package
We found that gertrude demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.