
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Helper methods for Ruby on Rails applications debugging. Screenshots.
dd <variable>
at any app/
place. Inspired by dd
function from
Laravel.
wp <variable>
at any app/
place. Inspired by classic PHP 'print' debug.
It works for HTML pages and bypass other content types like application/json
.
dump <variable>
at your views. It's alternative for debug
method from
ActionView::Helpers::DebugHelper
and ap
from AwesomePrint
.
Add this line to your Gemfile:
gem 'debug-extras', group: :development
And then execute:
$ bundle
Call dd
from any app/
place:
dd @books
Call wp
from any app/
place:
wp 'Authors through #wp method (called from controller):'
wp @authors
Call dump
from views:
<%= dump 'Books through #dump method (called from view):' %>
<%= dump @books %>
DebugExtras inject default CSS to the page on methods call. You can override styles and
set your fonts, margins, etc using .debug-extras
wrapper. Just look to the page sources to see
them at the end of head section.
Example how to override default fonts in your stylesheet:
.debug-extras pre,
.debug-extras kbd {
font-family: Consolas, SFMono-Regular, Menlo, Monaco, Ubuntu, monospace !important;
font-size: 14px !important;
line-height: 18px !important;
}
or may be you want to use pre-wrap
rendering:
.debug-extras pre {
white-space: pre-wrap !important;
}
Note: if #wp and #dump results look different compare to the screenshots above then default styles were overridden by yours.
DebugExtras is released under the MIT License.
FAQs
Unknown package
We found that debug-extras 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.