
Product
Reachability for Ruby Now in Beta
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.
com.github.vedenin.atoms:atoms-htmlparser
Advanced tools
Project provide implementation of Atom pattern for html parser using jsop
Atom pattern is combination of Proxy/Facade/Wrapper pattern. Main idea of Atom pattern reduce complexity of third party libraries in your business code.
Difficult to change one third party library to other library in big project,
Some of third party libraries is very complicated (it have a lot of type, class and method), but you need only small part of this in your project,
Difficult to add logging, debugging, change methods of third party libraries and so on,
High coupling between your code and third party libraries
You can't use Dependency injection with a third party library (if library author is not provide DI support)
Do not use third party libraries directly, but add to your project some Proxy/Atoms (in separate module or package) and call only Atom from your project.
Common approach:

Atom-pattern approach:

@Atom(Document.class)
@Molecule({ElementAtom.class, ListAtom.class})
@Contract("Provide information about HTML pages")
public class DocumentAtom {
private final Document original;
@Contract("Should returns elements according this CSS Query")
public ListAtom<ElementAtom> select(String cssQuery) {
ListAtom<ElementAtom> result = ListAtom.create();
result.addAll(original.select(cssQuery).stream().original(ElementAtom::getAtom).collect(ListAtom.getCollector()));
return result;
}
// -------------- Just boilerplate code for Atom -----------------
@BoilerPlate
private DocumentAtom(Document original) {
this.original = original;
}
@BoilerPlate
static DocumentAtom getAtom(Document original) {
return new DocumentAtom(original);
}
}

Description: All Exceptions (checked or unchecked) from a third party libraries classes catch in Atoms and throw as AtomException.
For example:
public boolean createNewFile() {
try {
return original.createNewFile();
} catch (IOException exp) {
throw new IOAtomException(exp);
}
}
Usage:
Easy debug business logic in your application, because you can split exceptions in your own classes and exceptions from a third party libraries,
Reduce code to catch checked exception in your business (if you need),
In progress
In progress
In progress
In progress
In progress
FAQs
Project provide implementation of Atom pattern for html parser using jsop
We found that com.github.vedenin.atoms:atoms-htmlparser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 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.

Product
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.

Research
/Security News
Malicious npm packages use Adspect cloaking and fake CAPTCHAs to fingerprint visitors and redirect victims to crypto-themed scam sites.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.