Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
braintree-rails is a framework that wraps the official braintree_ruby client library and provides ActiveModel compatible models that can be easily fit into an rails app.
BraintreeRails models have the same CRUD interface, can be used in Rails form helpers and url helpers. In addition, it has built in validations and callbacks. Even more, you can customize those quite easily.
While the official braintree_ruby gem is already quite easy to use, it is designed as a general ruby gem with very few dependencies, which is great.
However this generality does translate to a bit of boiler plate code to make it feel like "the rails way" in a rails app. For example, rendering a payment form with api error messages, or custom validations before sending outbound api calls. So, here goes the boiler plate code for your convenience.
In addition to the "railsy" interface, there are also some feature enhancements. For example, you can add custom validations or callbacks to each model.
Last, all braintree-rails uses behind the scenes are only the public APIs the official braintree_ruby provides. It does not touch any of the actual http request.
Before you head back here for detailed documents, I guess most likely you want to see it in actual code.
So here you go: braintree-rails-example
Live demo on Heroku: http://braintree-rails-example.herokuapp.com/
BraintreeRails should not give you any surprises if you have used ActiveRecord
.
However, I hope you can find some helpful descriptions and explanations at Documents.
If encountered bugs or undesired behaviors, feel free to open an issue with descriptions and reproducible steps.
Better yet, it will be great if you can open an pull requests with descriptions and tests.
Twitter: @LinYang
Write better documents.
Source code: braintree_ruby
Guides: Ruby Client Library
FAQs
Unknown package
We found that braintree-rails 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.