
Product
Rubygems Ecosystem Support Now Generally Available
Socket's Rubygems ecosystem support is moving from beta to GA, featuring enhanced security scanning to detect supply chain threats beyond traditional CVEs in your Ruby dependencies.
We use [`gatsby-source-filesystem`](https://www.gatsbyjs.org/packages/gatsby-source-filesystem/) in `gatsby-config.js` to create `File` nodes from our feature files. They can then be used with [`gatsby-transformer-gherkin`](https://www.gatsbyjs.org/packag
We use gatsby-source-filesystem
in gatsby-config.js
to create File
nodes from our feature files. They can then be used with gatsby-transformer-gherkin
to query contents of files with gherkin
syntax.
The code for creating feature pages with createPage
function lives in gatsby-node.js
, and it is using FeaturePage
as the template.
To highlight the code we use Prism.js and pass the formatted code directly to the template.
Most of the .feature
files in src/sites/marvel3/src/features
are symlinked, which means they point to the original files that live in corresponding apps and packages. If you update any of the files in the symlinked folders, they should also update in the original location (and vice versa).
When updating feature files, avoid renaming the symlinked folders (easy to spot, as they have an arrow next to folder name in VS Code) or moving any of the feature files out of them, because it can affect our tests. Having said that, you can create folders within the symlinked folders, update their contents and put feature files in them.
Run the following command from the features folder in src/sites/marvel3/src/features
:
ln -s ../../../../packages/prototype-viewer/src/features prototype-viewer-features
where the first argument is a path to the folder you want to symlink and the second argument is the name of your symlink.
In order for a feature file to be converted into a page, it needs to have # Parent:
and # Sidebar Link:
comments, which act as the file's metadata. # Parent:
is used as the category for the file, and # Sidebar Link:
is the name you will see in the sidebar. In the below example, Archiving project
and Unarchiving project
are pages with an Archive
parent.
--- Archive
------ Archiving project
------ Unarchiving project
Note: # Sidebar Link:
and # Parent
are also used for generating page urls.
Another two pieces of metadata you can use (although they are optional), are # Title:
and # Description
. They are a great way to provide more context to your feature pages.
https://share.getcloudapp.com/qGudWGJ5
You can use VS Code snippet feature to create a snippet for quickly adding metadata to your files (see attached video). To add it, follow the below steps:
shift + cmd + p
to open the commands menuPreferences: Configure User Snippets
.feature
extension "Add BDD Meta data": {
"prefix": "bdd-meta",
"body": [
"# Title: ",
"# Description: ",
"# Parent: ",
"# Sidebar Link: "
],
"description": "Add BDD meta data"
}
bdd-metadata
in your feature files to expand the snippet.FAQs
We use [`gatsby-source-filesystem`](https://www.gatsbyjs.org/packages/gatsby-source-filesystem/) in `gatsby-config.js` to create `File` nodes from our feature files. They can then be used with [`gatsby-transformer-gherkin`](https://www.gatsbyjs.org/packag
We found that bdd-docs 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.
Product
Socket's Rubygems ecosystem support is moving from beta to GA, featuring enhanced security scanning to detect supply chain threats beyond traditional CVEs in your Ruby dependencies.
Research
The Socket Research Team investigates a malicious npm package that appears to be an Advcash integration but triggers a reverse shell during payment success, targeting servers handling transactions.
Security Fundamentals
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.