Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
EZML is a templating engine for HTML. It's designed to make it both easier and
more pleasant to write HTML documents, by eliminating redundancy, reflecting the
underlying structure that the document represents, and providing an elegant syntax
that's both powerful and easy to understand.
EZML is used from the command line to compile .ezml documents to .html
To install, ensure you have ruby installed and run
gem install ezml
After you write some EZML, you can run
ezml document.ezml
This will compile it to HTML, to specifiy an output do the following
ezml document.ezml document.html
For more information on the commands use the folowing
ezml --help
The most basic element of EZML is a shorthand for creating HTML:
%tagname{:attr1 => 'value1', :attr2 => 'value2'} Contents
No end-tag is needed; EZML handles that automatically. If you prefer HTML-style attributes, you can also use:
%tagname(attr1='value1' attr2='value2') Contents
Adding class
and id
attributes is even easier. EZML uses the same syntax as
the CSS that styles the document:
%tagname#id.class
In fact, when you're using the <div>
tag, it becomes even easier. Because
<div>
is such a common element, a tag without a name defaults to a div. So
#foo Hello!
becomes
<div id='foo'>Hello!</div>
EZML uses indentation to bring the individual elements to represent the HTML structure. A tag's children are indented beneath than the parent tag. Again, a closing tag is automatically added. For example:
%ul
%li Salt
%li Pepper
becomes:
<ul>
<li>Salt</li>
<li>Pepper</li>
</ul>
You can also put plain text as a child of an element:
%p
Hello,
World!
It's also possible to embed Ruby code into EZML documents. An equals sign, =
,
will output the result of the code. A hyphen, -
, will run the code but not
output the result. You can even use control statements like if
and while
:
%p
Date/Time:
- now = DateTime.now
%strong= now
- if now > DateTime.parse("December 31, 2006")
= "Happy new " + "year!"
EZML's indentation can be made up of one or more tabs or spaces. However, indentation must be consistent within a given document. Hard tabs and spaces can't be mixed, and the same number of tabs or spaces must be used throughout.
Add this line to your application's Gemfile:
gem 'ezml'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ezml
TODO: Write usage instructions here
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
FAQs
Unknown package
We found that ezml demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.