Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hcl2-rb

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hcl2-rb

  • 0.9.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

hcl2-rb

Ruby common data types formatter to HCL2.

Using this tool you can format general Ruby data types to HCL2. Execute .to_hcl2 method, get the string and write it to a file

Example

It's very simple! You have the Hash:

vault_config = {
  ui: true,
  listener: {
    tcp: {
      address: '127.0.0.1:8200'
    },
    unix: {
      address: '/run/vault.sock'
    }
  },
  telemetry: {
    statsite_address: 'statsite.company.local:8125'
  }
}

Now format it to HCL2:

>> puts vault_config.to_hcl2
ui = true

listener "tcp" {
  address = "127.0.0.1:8200"

}

listener "unix" {
  address = "/run/vault.sock"

}

telemetry {
  statsite_address = "statsite.company.local:8125"

}

Contributing

Create a PR or a simple issue c:

Before PR creating, please, execute rspec and rubocop.

FAQs

Package last updated on 01 Jun 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc