New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

deprecations_detector

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deprecations_detector

  • 0.2.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Gem Version

DeprecationsDetector

The goal of this component is to collect and list all the deprecation of the project visually.

Installation

Add gem 'deprecations_detector' to your application's Gemfile and execute bundle.

Specify DeprecationDetector::Collect class as deprecation class with:

Rails.application.configure do
  ...
  config.active_support.deprecation = DeprecationsDetector::Collect
  ...
end

Put the following code under you specs configuration:

require 'deprecations_detector'

RSpec.configure do |config|
  config.before(:suite) do
    DeprecationsDetector::Main.start
  end

  config.around do |e|
    e.run
    DeprecationsDetector::Main.add(e)
  end

  config.after(:suite) do
    DeprecationsDetector::Main.save_results
    coverage_matrix = DeprecationsDetector::Main.coverage_matrix
    DeprecationsDetector::Formatters::HTML::Formatter.new.format(coverage_matrix)
  end
end

Run it on multiple jobs

Sometimes specs are run concurrently on multiple jobs. In order to collect the result on one file this gem provides some helpful task to combine the result in one single file and then format it.

  1. Remove the formatter from the after(:suite) hook
  2. Make the task available on your application following the instruction under Tasks section.
  3. Save the coverage result on the same directory with different name for any job (e.g. tmp/deps/a.yml, tmp/deps/b.yml etc..)
  4. Run the task to combine the YAML files bundle exec rake 'deprecations:combine[tmp/deps/,deprecations_detector.yml]'
  5. Run the task to format the YAML to HTML bundle exec rake 'deprecations:format[tmp/deps/,deprecations_detector.yml]'

Tasks

Add the following lines on your Rakefile to make the DeprecationsDetector tasks available from your application:

spec = Gem::Specification.find_by_name 'deprecations_detector'
load "#{spec.gem_dir}/lib/tasks/deprecations/combine.rake"
load "#{spec.gem_dir}/lib/tasks/deprecations/format.rake"

Testing

Execute bundle exec rspec on the component root path, specs are based on an internal fake project.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/nebulab/deprecations_detector. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

DeprecationsDetector is copyright © 2023 Nebulab. It is free software, and may be redistributed under the terms specified in the license. Inspired by ReverseCoverage

About

Nebulab

DeprecationsDetector is funded and maintained by the Nebulab team.

We firmly believe in the power of open-source. Contact us if you like our work and you need help with your project design or development.

FAQs

Package last updated on 09 Aug 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc