
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Simple YAML Frontmatter parser for Ruby.
Otterraft's installation is simple:
gem install otterraft
If you'd rather install Otterraft using bundler
, add a line for it in your Gemfile:
gem 'otterraft'
Otterraft is a simple YAML Frontmatter parser for Ruby. It can be used to parse YAML Frontmatter from a string.
text = <<~MARKDOWN_TEXT
---
title: Hello, World!
date: 2021-01-01 12:00 JST
tags:
- hello
- world
- ruby
---
# Hello, World!
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- First item
- Second item
MARKDOWN_TEXT
Otterraft.parse(text)
# => { "title" => "Hello, World!", "date" => "2021-01-01 12:00 JST", "tags" => ["hello", "world", "ruby"] }
Otterraft can also be used to parse YAML Frontmatter from a file.
If you have a file named hello.md
with the following content:
---
title: How to use parse from file
date: 2024-12-31 23:59 JST
tags:
- how-to
- parse
---
# Hello, World!
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
You can parse the file like this:
Otterraft.parse_file('hello.md')
# => { "title" => "How to use parse from file", "date" => "2024-12-31 23:59 JST", "tags" => ["how-to", "parse"] }
Bug reports and pull requests are welcome on GitHub at https://github.com/ydah/otterraft. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Otterraft project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
FAQs
Unknown package
We found that otterraft demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.