![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Lets you generate directory structures from a template, optionally processing paths (variables in the path) and contents (e.g., render ERB templates).
gem install directory_template
The examples given below are working examples. The templates are part of the gem and can be found in the directory 'examples'.
Create a template from an existing structure and materialize it (create directories & files):
require 'directory_template'
variables = {
namespace: 'Namespace',
version: '1.2.3',
gem_name: 'gem-name',
require_name: 'require_name',
description: "The description",
summary: "The summary"
}
template = DirectoryTemplate.directory('examples/dir_gem_template')
template.materialize('new_project', variables: variables)
Create a template from a YAML file:
require 'directory_template'
variables = {
namespace: 'Namespace',
version: '1.2.3',
gem_name: 'gem-name',
require_name: 'require_name',
description: "The description",
summary: "The summary"
}
template = DirectoryTemplate.yaml_file('examples/yaml_gem_template.yaml')
template.materialize('new_project', variables: variables)
DirectoryTemplate is a library which lets you generate directory structures and files from a template structure. The template structure can be a real directory structure on the filesystem, or it can be stored in a yaml file. Take a look at the examples directory in the gem to get an idea, how a template can look.
When generating a new directory structure from a template, DirectoryTemplate will process
the pathname of each directory and file using the DirectoryTemplate#path_processor.
It will also process the contents of each file with all processors that apply to a given
file.
The standard path processor allows you to use %{variables}
in pathnames. The gem comes
with a .erb (renders ERB templates) and .html.markdown processor (renders markdown to
html).
You can use the existing processors or define your own ones.
Also take a look at the {file:documentation/ContentProcessors.markdown Content Processors Guide} and the {file:documentation/ContentProcessors.markdown Path Processors Guide}.
You can use this code under the {file:LICENSE.txt BSD-2-Clause License}, free of charge. If you need a different license, please ask the author.
FAQs
Unknown package
We found that directory_template 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.