![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
rspec-formatter-webkit
Advanced tools
= A WebKit RSpec Formatter
http://deveiate.org/webkit-rspec-formatter.html
== Description
This is a formatter for RSpec 2 that takes advantage of features in WebKit[http://webkit.org/] to make the output from RSpec in Textmate more fun.
Test output looks like this:
http://deveiate.org/images/tmrspec-example.png
== Installation
To get started, install the rspec-formatter-webkit
gem:
$ gem install rspec-formatter-webkit
== Usage
If you're running specs in Textmate 2 via {the RSpec bundle}[http://github.com/rspec/rspec-tmbundle], include these in your .tm_properties file:
TM_RSPEC_OPTS = '-rrspec/core/formatters/webkit'
TM_RSPEC_FORMATTER = 'RSpec::Core::Formatters::WebKit'
To do the same in TextMate 1, open the 'Advanced' Preferences and adding the same variables there:
http://deveiate.org/images/tmrspecopts-shellvar.png
That's it!
=== Logging Output
If you have some kind of log output that you'd like to show up underneath the example, you can append lines of HTML to the logger-output thread-local variable and they'll be inserted into a +div+ under the example line that can be toggled open and closed by clicking the example line:
Thread.current['logger-output'] << %{<p>Some stuff happened.</p>}
Each line that has such logging appended will appear with an asterisk after it in the output.
==== Loggability
If you're using Loggability for logging, the WebKit formatter has CSS rules for the output of its HTML formatter, and includes a helper for injecting the logs generated for an example into the output. Just include the Loggability spec helper in your RSpec config:
require 'rspec'
require 'loggability/spechelpers'
RSpec.configure do |config|
config.include( Loggability::SpecHelpers )
end
== Miscellaneous
This formatter is also usable anywhere else the standard HTML formatter is, of course. Also, while it's specifically intended to be used under the Textmate HTML viewer that the RSpec bundle uses, the output should work fine under recent Gecko/Firefox-based viewers, as well.
Patches/suggestions welcomed.
== Contributing
You can check out the current development source with Mercurial via its {project page}[ssh://repo.deveiate.org/rspec-formatter-webkit]. Or if you prefer Git, via {its Github mirror}[https://github.com/ged/rspec-formatter-webkit].
After checking out the source, run:
$ rake newb
This task will install any missing dependencies and generate the API documentation.
== License
Copyright (c) 2009-2015, Michael Granger All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the author/s, nor the names of the project's contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
FAQs
Unknown package
We found that rspec-formatter-webkit 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.