diff --git a/.github/workflows/dep_shield.yml b/.github/workflows/dep_shield.yml new file mode 100644 index 00000000..8d10c394 --- /dev/null +++ b/.github/workflows/dep_shield.yml @@ -0,0 +1,12 @@ +name: dep_shield + +on: + push: + +jobs: + ruby: + uses: powerhome/github-actions-workflows/.github/workflows/ruby-gem.yml@main + with: + package: ${{ github.workflow }} + workdir: "packages/${{ github.workflow }}" + secrets: inherit diff --git a/docs/README.md b/docs/README.md index e5029499..cfccda8c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -30,6 +30,10 @@ Helping ruby developers implement easy patterns. Delicious and sanitized data samples for development and testing. +[dep_shield](https://github.com/powerhome/power-tools/blob/main/packages/dep_shield/docs/README.md) 💎 + +Enable alerts about deprecated features & prevent new ones from being introduced. + [edgestitch](https://github.com/powerhome/power-tools/blob/main/packages/edgestitch/docs/README.md) 💎 Edgestitch allows engines to define partial structure-self.sql files to be stitched into a single structure.sql file by the umbrella application. diff --git a/packages/api_chai/LICENSE.txt b/packages/api_chai/LICENSE.txt index 3e4b348e..fde926f5 100644 --- a/packages/api_chai/LICENSE.txt +++ b/packages/api_chai/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2024 Jill Klang +Copyright Power Home Remodeling Group, LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/packages/data_taster/CODE_OF_CONDUCT.md b/packages/data_taster/CODE_OF_CONDUCT.md deleted file mode 100644 index db8b52a7..00000000 --- a/packages/data_taster/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,84 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our community include: - -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience -* Focusing on what is best not just for us as individuals, but for the overall community - -Examples of unacceptable behavior include: - -* The use of sexualized language or imagery, and sexual attention or - advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email - address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at jill.klang@powerhrg.com. All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series of actions. - -**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within the community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, -available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. - -Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). - -[homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see the FAQ at -https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. diff --git a/packages/data_taster/LICENSE.txt b/packages/data_taster/LICENSE.txt index 350e48ce..fde926f5 100644 --- a/packages/data_taster/LICENSE.txt +++ b/packages/data_taster/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2023 Jill Klang +Copyright Power Home Remodeling Group, LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/packages/dep_shield/.gitignore b/packages/dep_shield/.gitignore new file mode 100644 index 00000000..f150bf5c --- /dev/null +++ b/packages/dep_shield/.gitignore @@ -0,0 +1,13 @@ +/.bundle/ +/.yardoc +/_yardoc/ +/coverage/ +/pkg/ +/spec/reports/ +/tmp/ + +# rspec failure tracking +.rspec_status + +*.sqlite3 +*.sqlite diff --git a/packages/dep_shield/.rubocop.yml b/packages/dep_shield/.rubocop.yml new file mode 100644 index 00000000..ceb996c2 --- /dev/null +++ b/packages/dep_shield/.rubocop.yml @@ -0,0 +1,16 @@ +require: + - rubocop-powerhome + +AllCops: + TargetRubyVersion: 2.7 + +Style/StringLiterals: + Enabled: true + EnforcedStyle: double_quotes + +Style/StringLiteralsInInterpolation: + Enabled: true + EnforcedStyle: double_quotes + +Layout/LineLength: + Max: 120 diff --git a/packages/dep_shield/Appraisals b/packages/dep_shield/Appraisals new file mode 100644 index 00000000..895c313c --- /dev/null +++ b/packages/dep_shield/Appraisals @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +appraise "rails-6-0" do + gem "rails", "6.0.6.1" +end + +appraise "rails-6-1" do + gem "rails", "6.1.7.4" +end + +appraise "rails-7-0" do + gem "rails", "7.0.6" +end diff --git a/packages/dep_shield/CHANGELOG.md b/packages/dep_shield/CHANGELOG.md new file mode 100644 index 00000000..e674c431 --- /dev/null +++ b/packages/dep_shield/CHANGELOG.md @@ -0,0 +1,5 @@ +## [Unreleased] + +## [0.1.0] - 2024-01-17 + +- Initial release diff --git a/packages/dep_shield/Gemfile b/packages/dep_shield/Gemfile new file mode 100644 index 00000000..6536685d --- /dev/null +++ b/packages/dep_shield/Gemfile @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +source "https://rubygems.org" + +# Specify your gem's dependencies in dep_shield.gemspec +gemspec + +gem "nokogiri", "< 1.16" + +gem "rake", "~> 13.0" + +gem "rspec", "~> 3.0" + +gem "rubocop-powerhome", path: "../rubocop-powerhome" diff --git a/packages/dep_shield/Gemfile.lock b/packages/dep_shield/Gemfile.lock new file mode 100644 index 00000000..003b3fa3 --- /dev/null +++ b/packages/dep_shield/Gemfile.lock @@ -0,0 +1,276 @@ +PATH + remote: ../rubocop-powerhome + specs: + rubocop-powerhome (0.5.2) + rubocop (~> 1.52.0) + rubocop-performance + rubocop-rails + rubocop-rake + rubocop-rspec + +PATH + remote: . + specs: + dep_shield (0.1.1) + nitro_config + rails (>= 6.0.6.1, < 7.0) + sentry-rails (= 5.5.0) + sentry-ruby (= 5.5.0) + +GEM + remote: https://rubygems.org/ + specs: + actioncable (6.1.7.6) + actionpack (= 6.1.7.6) + activesupport (= 6.1.7.6) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + actionmailbox (6.1.7.6) + actionpack (= 6.1.7.6) + activejob (= 6.1.7.6) + activerecord (= 6.1.7.6) + activestorage (= 6.1.7.6) + activesupport (= 6.1.7.6) + mail (>= 2.7.1) + actionmailer (6.1.7.6) + actionpack (= 6.1.7.6) + actionview (= 6.1.7.6) + activejob (= 6.1.7.6) + activesupport (= 6.1.7.6) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 2.0) + actionpack (6.1.7.6) + actionview (= 6.1.7.6) + activesupport (= 6.1.7.6) + rack (~> 2.0, >= 2.0.9) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actiontext (6.1.7.6) + actionpack (= 6.1.7.6) + activerecord (= 6.1.7.6) + activestorage (= 6.1.7.6) + activesupport (= 6.1.7.6) + nokogiri (>= 1.8.5) + actionview (6.1.7.6) + activesupport (= 6.1.7.6) + builder (~> 3.1) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + activejob (6.1.7.6) + activesupport (= 6.1.7.6) + globalid (>= 0.3.6) + activemodel (6.1.7.6) + activesupport (= 6.1.7.6) + activerecord (6.1.7.6) + activemodel (= 6.1.7.6) + activesupport (= 6.1.7.6) + activestorage (6.1.7.6) + actionpack (= 6.1.7.6) + activejob (= 6.1.7.6) + activerecord (= 6.1.7.6) + activesupport (= 6.1.7.6) + marcel (~> 1.0) + mini_mime (>= 1.1.0) + activesupport (6.1.7.6) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + ast (2.4.2) + builder (3.2.4) + combustion (1.4.0) + activesupport (>= 3.0.0) + railties (>= 3.0.0) + thor (>= 0.14.6) + concurrent-ruby (1.2.3) + crass (1.0.6) + date (3.3.4) + diff-lcs (1.5.0) + erubi (1.12.0) + globalid (1.2.1) + activesupport (>= 6.1) + i18n (1.14.1) + concurrent-ruby (~> 1.0) + json (2.7.1) + license_finder (7.1.0) + bundler + rubyzip (>= 1, < 3) + thor (~> 1.2) + tomlrb (>= 1.3, < 2.1) + with_env (= 1.1.0) + xml-simple (~> 1.1.9) + loofah (2.22.0) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + mail (2.8.1) + mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp + marcel (1.0.2) + method_source (1.0.0) + mini_mime (1.1.5) + mini_portile2 (2.8.5) + minitest (5.21.1) + net-imap (0.4.9.1) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.2) + timeout + net-smtp (0.4.0.1) + net-protocol + nio4r (2.7.0) + nitro_config (0.2.0) + activesupport (>= 5.2.8.1) + nokogiri (1.15.5) + mini_portile2 (~> 2.8.2) + racc (~> 1.4) + nokogiri (1.15.5-arm64-darwin) + racc (~> 1.4) + parallel (1.24.0) + parser (3.3.0.5) + ast (~> 2.4.1) + racc + racc (1.7.3) + rack (2.2.8) + rack-test (2.1.0) + rack (>= 1.3) + rails (6.1.7.6) + actioncable (= 6.1.7.6) + actionmailbox (= 6.1.7.6) + actionmailer (= 6.1.7.6) + actionpack (= 6.1.7.6) + actiontext (= 6.1.7.6) + actionview (= 6.1.7.6) + activejob (= 6.1.7.6) + activemodel (= 6.1.7.6) + activerecord (= 6.1.7.6) + activestorage (= 6.1.7.6) + activesupport (= 6.1.7.6) + bundler (>= 1.15.0) + railties (= 6.1.7.6) + sprockets-rails (>= 2.0.0) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + railties (6.1.7.6) + actionpack (= 6.1.7.6) + activesupport (= 6.1.7.6) + method_source + rake (>= 12.2) + thor (~> 1.0) + rainbow (3.1.1) + rake (13.1.0) + regexp_parser (2.9.0) + rexml (3.2.6) + rspec (3.12.0) + rspec-core (~> 3.12.0) + rspec-expectations (~> 3.12.0) + rspec-mocks (~> 3.12.0) + rspec-core (3.12.2) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.3) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-mocks (3.12.6) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-rails (5.1.2) + actionpack (>= 5.2) + activesupport (>= 5.2) + railties (>= 5.2) + rspec-core (~> 3.10) + rspec-expectations (~> 3.10) + rspec-mocks (~> 3.10) + rspec-support (~> 3.10) + rspec-support (3.12.1) + rubocop (1.52.1) + json (~> 2.3) + parallel (~> 1.10) + parser (>= 3.2.2.3) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.28.0, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.30.0) + parser (>= 3.2.1.0) + rubocop-capybara (2.20.0) + rubocop (~> 1.41) + rubocop-factory_bot (2.25.1) + rubocop (~> 1.41) + rubocop-performance (1.20.2) + rubocop (>= 1.48.1, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) + rubocop-rails (2.23.1) + activesupport (>= 4.2.0) + rack (>= 1.1) + rubocop (>= 1.33.0, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) + rubocop-rake (0.6.0) + rubocop (~> 1.0) + rubocop-rspec (2.26.1) + rubocop (~> 1.40) + rubocop-capybara (~> 2.17) + rubocop-factory_bot (~> 2.22) + ruby-progressbar (1.13.0) + rubyzip (2.3.2) + sentry-rails (5.5.0) + railties (>= 5.0) + sentry-ruby (~> 5.5.0) + sentry-ruby (5.5.0) + concurrent-ruby (~> 1.0, >= 1.0.2) + sprockets (4.2.1) + concurrent-ruby (~> 1.0) + rack (>= 2.2.4, < 4) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) + sprockets (>= 3.0.0) + sqlite3 (1.4.4) + thor (1.3.0) + timeout (0.4.1) + tomlrb (2.0.3) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + unicode-display_width (2.5.0) + websocket-driver (0.7.6) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) + with_env (1.1.0) + xml-simple (1.1.9) + rexml + zeitwerk (2.6.12) + +PLATFORMS + arm64-darwin-23 + ruby + +DEPENDENCIES + appraisal (~> 2.5.0) + combustion (~> 1.4) + dep_shield! + license_finder (>= 7.0) + nokogiri (< 1.16) + rake (~> 13.0) + rspec (~> 3.0) + rspec-rails (~> 5.1.2) + rubocop-powerhome! + sqlite3 (~> 1.4.2) + +BUNDLED WITH + 2.5.4 diff --git a/packages/dep_shield/LICENSE.txt b/packages/dep_shield/LICENSE.txt new file mode 100644 index 00000000..fde926f5 --- /dev/null +++ b/packages/dep_shield/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright Power Home Remodeling Group, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/packages/dep_shield/Rakefile b/packages/dep_shield/Rakefile new file mode 100644 index 00000000..cca71754 --- /dev/null +++ b/packages/dep_shield/Rakefile @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +require "bundler/gem_tasks" +require "rspec/core/rake_task" + +RSpec::Core::RakeTask.new(:spec) + +require "rubocop/rake_task" + +RuboCop::RakeTask.new + +task default: %i[spec rubocop] diff --git a/packages/dep_shield/bin/console b/packages/dep_shield/bin/console new file mode 100755 index 00000000..0b8bd41e --- /dev/null +++ b/packages/dep_shield/bin/console @@ -0,0 +1,11 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +require "bundler/setup" +require "dep_shield" + +# You can add fixtures and/or initialization code here to make experimenting +# with your gem easier. You can also use a different console, if you like. + +require "irb" +IRB.start(__FILE__) diff --git a/packages/dep_shield/bin/setup b/packages/dep_shield/bin/setup new file mode 100755 index 00000000..dce67d86 --- /dev/null +++ b/packages/dep_shield/bin/setup @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -euo pipefail +IFS=$'\n\t' +set -vx + +bundle install + +# Do any other automated setup that you need to do here diff --git a/packages/dep_shield/config.ru b/packages/dep_shield/config.ru new file mode 100644 index 00000000..1265db9f --- /dev/null +++ b/packages/dep_shield/config.ru @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +require "rubygems" +require "bundler" + +Bundler.require :default, :development + +Combustion.initialize! :all +run Combustion::Application diff --git a/packages/dep_shield/dep_shield.gemspec b/packages/dep_shield/dep_shield.gemspec new file mode 100644 index 00000000..80fd38ee --- /dev/null +++ b/packages/dep_shield/dep_shield.gemspec @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +require_relative "lib/dep_shield/version" + +Gem::Specification.new do |spec| + spec.name = "dep_shield" + spec.version = DepShield::VERSION + spec.authors = ["Jill Klang"] + spec.email = ["jillian.emilie@powerhrg.com"] + + spec.summary = "Vigilant alerts for deprecated or outdated code." + spec.description = "Enable alerts about deprecated features & prevent new ones from being introduced." + spec.homepage = "https://github.com/powerhome/power-tools" + spec.license = "MIT" + spec.required_ruby_version = ">= 2.7" + + spec.metadata["rubygems_mfa_required"] = "true" + spec.metadata["homepage_uri"] = spec.homepage + spec.metadata["source_code_uri"] = spec.homepage + spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/main/packages/data_taster/docs/CHANGELOG.md" + + # Specify which files should be added to the gem when it is released. + # The `git ls-files -z` loads the files in the RubyGem that have been added into git. + spec.files = Dir.chdir(__dir__) do + `git ls-files -z`.split("\x0").reject do |f| + (File.expand_path(f) == __FILE__) || + f.start_with?(*%w[bin/ test/ spec/ features/ .git .github appveyor Gemfile]) + end + end + spec.bindir = "exe" + spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) } + spec.require_paths = ["lib"] + + spec.add_development_dependency "appraisal", "~> 2.5.0" + spec.add_development_dependency "combustion", "~> 1.4" + spec.add_development_dependency "license_finder", ">= 7.0" + spec.add_development_dependency "rspec", "~> 3.0" + spec.add_development_dependency "rspec-rails", "~> 5.1.2" + spec.add_development_dependency "sqlite3", "~> 1.4.2" + + spec.add_dependency "nitro_config" + spec.add_dependency "rails", ">= 6.0.6.1", "< 7.0" + spec.add_dependency "sentry-rails", "5.5.0" + spec.add_dependency "sentry-ruby", "5.5.0" +end diff --git a/packages/dep_shield/doc/dependency_decisions.yml b/packages/dep_shield/doc/dependency_decisions.yml new file mode 100644 index 00000000..f734baa9 --- /dev/null +++ b/packages/dep_shield/doc/dependency_decisions.yml @@ -0,0 +1,3 @@ +--- +- - :inherit_from + - https://raw.githubusercontent.com/powerhome/oss-guide/master/license_rules.yml diff --git a/packages/dep_shield/docs/README.md b/packages/dep_shield/docs/README.md new file mode 100644 index 00000000..a5cc58e9 --- /dev/null +++ b/packages/dep_shield/docs/README.md @@ -0,0 +1,9 @@ +# 🛡️ DepShield 🛡️ + +Introducing DepShield, your go-to Ruby gem for proactive deprecation management in your codebase, making upgrading dependencies easier and faster. + +With DepShield, developers can stay ahead of the curve by receiving real-time alerts about deprecated code, ensuring a smoother transition to future updates. Tailor your development and demo environments to raise alarms, preventing the introduction of new deprecations. In addition, DepShield offers the flexibility to configure self-reporting mechanisms, allowing seamless issue notifications, configurable by environment Say goodbye to unexpected deprecation surprises and embrace a more streamlined and informed coding experience with DepShield! + +## Usage + +TODO: Write usage instructions here diff --git a/packages/dep_shield/gemfiles/rails_6_0.gemfile b/packages/dep_shield/gemfiles/rails_6_0.gemfile new file mode 100644 index 00000000..f6b7e6a7 --- /dev/null +++ b/packages/dep_shield/gemfiles/rails_6_0.gemfile @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "rails", "6.0.6.1" +gem "rake", "~> 13.0" +gem "rspec", "~> 3.0" +gem "rubocop", "~> 1.21" + +gemspec path: "../" diff --git a/packages/dep_shield/gemfiles/rails_6_0.gemfile.lock b/packages/dep_shield/gemfiles/rails_6_0.gemfile.lock new file mode 100644 index 00000000..86fe1ad2 --- /dev/null +++ b/packages/dep_shield/gemfiles/rails_6_0.gemfile.lock @@ -0,0 +1,243 @@ +PATH + remote: .. + specs: + dep_shield (0.1.0) + sentry-ruby (= 5.5.0) + +GEM + remote: https://rubygems.org/ + specs: + actioncable (6.0.6.1) + actionpack (= 6.0.6.1) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + actionmailbox (6.0.6.1) + actionpack (= 6.0.6.1) + activejob (= 6.0.6.1) + activerecord (= 6.0.6.1) + activestorage (= 6.0.6.1) + activesupport (= 6.0.6.1) + mail (>= 2.7.1) + actionmailer (6.0.6.1) + actionpack (= 6.0.6.1) + actionview (= 6.0.6.1) + activejob (= 6.0.6.1) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 2.0) + actionpack (6.0.6.1) + actionview (= 6.0.6.1) + activesupport (= 6.0.6.1) + rack (~> 2.0, >= 2.0.8) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actiontext (6.0.6.1) + actionpack (= 6.0.6.1) + activerecord (= 6.0.6.1) + activestorage (= 6.0.6.1) + activesupport (= 6.0.6.1) + nokogiri (>= 1.8.5) + actionview (6.0.6.1) + activesupport (= 6.0.6.1) + builder (~> 3.1) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + activejob (6.0.6.1) + activesupport (= 6.0.6.1) + globalid (>= 0.3.6) + activemodel (6.0.6.1) + activesupport (= 6.0.6.1) + activerecord (6.0.6.1) + activemodel (= 6.0.6.1) + activesupport (= 6.0.6.1) + activestorage (6.0.6.1) + actionpack (= 6.0.6.1) + activejob (= 6.0.6.1) + activerecord (= 6.0.6.1) + marcel (~> 1.0) + activesupport (6.0.6.1) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) + minitest (~> 5.1) + tzinfo (~> 1.1) + zeitwerk (~> 2.2, >= 2.2.2) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + ast (2.4.2) + builder (3.2.4) + concurrent-ruby (1.2.3) + crass (1.0.6) + date (3.3.4) + diff-lcs (1.5.0) + erubi (1.12.0) + globalid (1.1.0) + activesupport (>= 5.0) + i18n (1.14.1) + concurrent-ruby (~> 1.0) + json (2.7.1) + language_server-protocol (3.17.0.3) + license_finder (7.1.0) + bundler + rubyzip (>= 1, < 3) + thor (~> 1.2) + tomlrb (>= 1.3, < 2.1) + with_env (= 1.1.0) + xml-simple (~> 1.1.9) + loofah (2.22.0) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + mail (2.8.1) + mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp + marcel (1.0.2) + method_source (1.0.0) + mini_mime (1.1.5) + minitest (5.21.1) + net-imap (0.4.9.1) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.2) + timeout + net-smtp (0.4.0.1) + net-protocol + nio4r (2.7.0) + nokogiri (1.16.0-arm64-darwin) + racc (~> 1.4) + parallel (1.24.0) + parser (3.3.0.4) + ast (~> 2.4.1) + racc + racc (1.7.3) + rack (2.2.8) + rack-test (2.1.0) + rack (>= 1.3) + rails (6.0.6.1) + actioncable (= 6.0.6.1) + actionmailbox (= 6.0.6.1) + actionmailer (= 6.0.6.1) + actionpack (= 6.0.6.1) + actiontext (= 6.0.6.1) + actionview (= 6.0.6.1) + activejob (= 6.0.6.1) + activemodel (= 6.0.6.1) + activerecord (= 6.0.6.1) + activestorage (= 6.0.6.1) + activesupport (= 6.0.6.1) + bundler (>= 1.3.0) + railties (= 6.0.6.1) + sprockets-rails (>= 2.0.0) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + railties (6.0.6.1) + actionpack (= 6.0.6.1) + activesupport (= 6.0.6.1) + method_source + rake (>= 0.8.7) + thor (>= 0.20.3, < 2.0) + rainbow (3.1.1) + rake (13.1.0) + regexp_parser (2.9.0) + rexml (3.2.6) + rspec (3.12.0) + rspec-core (~> 3.12.0) + rspec-expectations (~> 3.12.0) + rspec-mocks (~> 3.12.0) + rspec-core (3.12.2) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.3) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-mocks (3.12.6) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-support (3.12.1) + rubocop (1.60.1) + json (~> 2.3) + language_server-protocol (>= 3.17.0) + parallel (~> 1.10) + parser (>= 3.3.0.2) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.30.0, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.30.0) + parser (>= 3.2.1.0) + rubocop-capybara (2.20.0) + rubocop (~> 1.41) + rubocop-factory_bot (2.25.1) + rubocop (~> 1.41) + rubocop-performance (1.20.2) + rubocop (>= 1.48.1, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) + rubocop-powerhome (0.5.0) + rubocop + rubocop-performance + rubocop-rails + rubocop-rake + rubocop-rspec + rubocop-rails (2.23.1) + activesupport (>= 4.2.0) + rack (>= 1.1) + rubocop (>= 1.33.0, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) + rubocop-rake (0.6.0) + rubocop (~> 1.0) + rubocop-rspec (2.26.1) + rubocop (~> 1.40) + rubocop-capybara (~> 2.17) + rubocop-factory_bot (~> 2.22) + ruby-progressbar (1.13.0) + rubyzip (2.3.2) + sentry-ruby (5.5.0) + concurrent-ruby (~> 1.0, >= 1.0.2) + sprockets (4.2.1) + concurrent-ruby (~> 1.0) + rack (>= 2.2.4, < 4) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) + sprockets (>= 3.0.0) + thor (1.3.0) + thread_safe (0.3.6) + timeout (0.4.1) + tomlrb (2.0.3) + tzinfo (1.2.11) + thread_safe (~> 0.1) + unicode-display_width (2.5.0) + websocket-driver (0.7.6) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) + with_env (1.1.0) + xml-simple (1.1.9) + rexml + zeitwerk (2.6.12) + +PLATFORMS + arm64-darwin + +DEPENDENCIES + appraisal (~> 2.5.0) + dep_shield! + license_finder (>= 7.0) + rails (= 6.0.6.1) + rake (~> 13.0) + rspec (~> 3.0) + rubocop (~> 1.21) + rubocop-powerhome (= 0.5.0) + +BUNDLED WITH + 2.5.4 diff --git a/packages/dep_shield/gemfiles/rails_6_1.gemfile b/packages/dep_shield/gemfiles/rails_6_1.gemfile new file mode 100644 index 00000000..a578cf4f --- /dev/null +++ b/packages/dep_shield/gemfiles/rails_6_1.gemfile @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "rails", "6.1.7.4" +gem "rake", "~> 13.0" +gem "rspec", "~> 3.0" +gem "rubocop", "~> 1.21" + +gemspec path: "../" diff --git a/packages/dep_shield/gemfiles/rails_6_1.gemfile.lock b/packages/dep_shield/gemfiles/rails_6_1.gemfile.lock new file mode 100644 index 00000000..d27c0338 --- /dev/null +++ b/packages/dep_shield/gemfiles/rails_6_1.gemfile.lock @@ -0,0 +1,246 @@ +PATH + remote: .. + specs: + dep_shield (0.1.0) + sentry-ruby (= 5.5.0) + +GEM + remote: https://rubygems.org/ + specs: + actioncable (6.1.7.4) + actionpack (= 6.1.7.4) + activesupport (= 6.1.7.4) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + actionmailbox (6.1.7.4) + actionpack (= 6.1.7.4) + activejob (= 6.1.7.4) + activerecord (= 6.1.7.4) + activestorage (= 6.1.7.4) + activesupport (= 6.1.7.4) + mail (>= 2.7.1) + actionmailer (6.1.7.4) + actionpack (= 6.1.7.4) + actionview (= 6.1.7.4) + activejob (= 6.1.7.4) + activesupport (= 6.1.7.4) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 2.0) + actionpack (6.1.7.4) + actionview (= 6.1.7.4) + activesupport (= 6.1.7.4) + rack (~> 2.0, >= 2.0.9) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actiontext (6.1.7.4) + actionpack (= 6.1.7.4) + activerecord (= 6.1.7.4) + activestorage (= 6.1.7.4) + activesupport (= 6.1.7.4) + nokogiri (>= 1.8.5) + actionview (6.1.7.4) + activesupport (= 6.1.7.4) + builder (~> 3.1) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + activejob (6.1.7.4) + activesupport (= 6.1.7.4) + globalid (>= 0.3.6) + activemodel (6.1.7.4) + activesupport (= 6.1.7.4) + activerecord (6.1.7.4) + activemodel (= 6.1.7.4) + activesupport (= 6.1.7.4) + activestorage (6.1.7.4) + actionpack (= 6.1.7.4) + activejob (= 6.1.7.4) + activerecord (= 6.1.7.4) + activesupport (= 6.1.7.4) + marcel (~> 1.0) + mini_mime (>= 1.1.0) + activesupport (6.1.7.4) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + ast (2.4.2) + builder (3.2.4) + concurrent-ruby (1.2.3) + crass (1.0.6) + date (3.3.4) + diff-lcs (1.5.0) + erubi (1.12.0) + globalid (1.2.1) + activesupport (>= 6.1) + i18n (1.14.1) + concurrent-ruby (~> 1.0) + json (2.7.1) + language_server-protocol (3.17.0.3) + license_finder (7.1.0) + bundler + rubyzip (>= 1, < 3) + thor (~> 1.2) + tomlrb (>= 1.3, < 2.1) + with_env (= 1.1.0) + xml-simple (~> 1.1.9) + loofah (2.22.0) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + mail (2.8.1) + mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp + marcel (1.0.2) + method_source (1.0.0) + mini_mime (1.1.5) + minitest (5.21.1) + net-imap (0.4.9.1) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.2) + timeout + net-smtp (0.4.0.1) + net-protocol + nio4r (2.7.0) + nokogiri (1.16.0-arm64-darwin) + racc (~> 1.4) + parallel (1.24.0) + parser (3.3.0.4) + ast (~> 2.4.1) + racc + racc (1.7.3) + rack (2.2.8) + rack-test (2.1.0) + rack (>= 1.3) + rails (6.1.7.4) + actioncable (= 6.1.7.4) + actionmailbox (= 6.1.7.4) + actionmailer (= 6.1.7.4) + actionpack (= 6.1.7.4) + actiontext (= 6.1.7.4) + actionview (= 6.1.7.4) + activejob (= 6.1.7.4) + activemodel (= 6.1.7.4) + activerecord (= 6.1.7.4) + activestorage (= 6.1.7.4) + activesupport (= 6.1.7.4) + bundler (>= 1.15.0) + railties (= 6.1.7.4) + sprockets-rails (>= 2.0.0) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + railties (6.1.7.4) + actionpack (= 6.1.7.4) + activesupport (= 6.1.7.4) + method_source + rake (>= 12.2) + thor (~> 1.0) + rainbow (3.1.1) + rake (13.1.0) + regexp_parser (2.9.0) + rexml (3.2.6) + rspec (3.12.0) + rspec-core (~> 3.12.0) + rspec-expectations (~> 3.12.0) + rspec-mocks (~> 3.12.0) + rspec-core (3.12.2) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.3) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-mocks (3.12.6) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-support (3.12.1) + rubocop (1.60.1) + json (~> 2.3) + language_server-protocol (>= 3.17.0) + parallel (~> 1.10) + parser (>= 3.3.0.2) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.30.0, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.30.0) + parser (>= 3.2.1.0) + rubocop-capybara (2.20.0) + rubocop (~> 1.41) + rubocop-factory_bot (2.25.1) + rubocop (~> 1.41) + rubocop-performance (1.20.2) + rubocop (>= 1.48.1, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) + rubocop-powerhome (0.5.0) + rubocop + rubocop-performance + rubocop-rails + rubocop-rake + rubocop-rspec + rubocop-rails (2.23.1) + activesupport (>= 4.2.0) + rack (>= 1.1) + rubocop (>= 1.33.0, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) + rubocop-rake (0.6.0) + rubocop (~> 1.0) + rubocop-rspec (2.26.1) + rubocop (~> 1.40) + rubocop-capybara (~> 2.17) + rubocop-factory_bot (~> 2.22) + ruby-progressbar (1.13.0) + rubyzip (2.3.2) + sentry-ruby (5.5.0) + concurrent-ruby (~> 1.0, >= 1.0.2) + sprockets (4.2.1) + concurrent-ruby (~> 1.0) + rack (>= 2.2.4, < 4) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) + sprockets (>= 3.0.0) + thor (1.3.0) + timeout (0.4.1) + tomlrb (2.0.3) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + unicode-display_width (2.5.0) + websocket-driver (0.7.6) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) + with_env (1.1.0) + xml-simple (1.1.9) + rexml + zeitwerk (2.6.12) + +PLATFORMS + arm64-darwin + +DEPENDENCIES + appraisal (~> 2.5.0) + dep_shield! + license_finder (>= 7.0) + rails (= 6.1.7.4) + rake (~> 13.0) + rspec (~> 3.0) + rubocop (~> 1.21) + rubocop-powerhome (= 0.5.0) + +BUNDLED WITH + 2.5.4 diff --git a/packages/dep_shield/gemfiles/rails_7_0.gemfile b/packages/dep_shield/gemfiles/rails_7_0.gemfile new file mode 100644 index 00000000..c0b24228 --- /dev/null +++ b/packages/dep_shield/gemfiles/rails_7_0.gemfile @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "rails", "7.0.6" +gem "rake", "~> 13.0" +gem "rspec", "~> 3.0" +gem "rubocop", "~> 1.21" + +gemspec path: "../" diff --git a/packages/dep_shield/gemfiles/rails_7_0.gemfile.lock b/packages/dep_shield/gemfiles/rails_7_0.gemfile.lock new file mode 100644 index 00000000..86de713a --- /dev/null +++ b/packages/dep_shield/gemfiles/rails_7_0.gemfile.lock @@ -0,0 +1,245 @@ +PATH + remote: .. + specs: + dep_shield (0.1.0) + sentry-ruby (= 5.5.0) + +GEM + remote: https://rubygems.org/ + specs: + actioncable (7.0.6) + actionpack (= 7.0.6) + activesupport (= 7.0.6) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + actionmailbox (7.0.6) + actionpack (= 7.0.6) + activejob (= 7.0.6) + activerecord (= 7.0.6) + activestorage (= 7.0.6) + activesupport (= 7.0.6) + mail (>= 2.7.1) + net-imap + net-pop + net-smtp + actionmailer (7.0.6) + actionpack (= 7.0.6) + actionview (= 7.0.6) + activejob (= 7.0.6) + activesupport (= 7.0.6) + mail (~> 2.5, >= 2.5.4) + net-imap + net-pop + net-smtp + rails-dom-testing (~> 2.0) + actionpack (7.0.6) + actionview (= 7.0.6) + activesupport (= 7.0.6) + rack (~> 2.0, >= 2.2.4) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actiontext (7.0.6) + actionpack (= 7.0.6) + activerecord (= 7.0.6) + activestorage (= 7.0.6) + activesupport (= 7.0.6) + globalid (>= 0.6.0) + nokogiri (>= 1.8.5) + actionview (7.0.6) + activesupport (= 7.0.6) + builder (~> 3.1) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + activejob (7.0.6) + activesupport (= 7.0.6) + globalid (>= 0.3.6) + activemodel (7.0.6) + activesupport (= 7.0.6) + activerecord (7.0.6) + activemodel (= 7.0.6) + activesupport (= 7.0.6) + activestorage (7.0.6) + actionpack (= 7.0.6) + activejob (= 7.0.6) + activerecord (= 7.0.6) + activesupport (= 7.0.6) + marcel (~> 1.0) + mini_mime (>= 1.1.0) + activesupport (7.0.6) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + ast (2.4.2) + builder (3.2.4) + concurrent-ruby (1.2.3) + crass (1.0.6) + date (3.3.4) + diff-lcs (1.5.0) + erubi (1.12.0) + globalid (1.2.1) + activesupport (>= 6.1) + i18n (1.14.1) + concurrent-ruby (~> 1.0) + json (2.7.1) + language_server-protocol (3.17.0.3) + license_finder (7.1.0) + bundler + rubyzip (>= 1, < 3) + thor (~> 1.2) + tomlrb (>= 1.3, < 2.1) + with_env (= 1.1.0) + xml-simple (~> 1.1.9) + loofah (2.22.0) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + mail (2.8.1) + mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp + marcel (1.0.2) + method_source (1.0.0) + mini_mime (1.1.5) + minitest (5.21.1) + net-imap (0.4.9.1) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.2) + timeout + net-smtp (0.4.0.1) + net-protocol + nio4r (2.7.0) + nokogiri (1.16.0-arm64-darwin) + racc (~> 1.4) + parallel (1.24.0) + parser (3.3.0.4) + ast (~> 2.4.1) + racc + racc (1.7.3) + rack (2.2.8) + rack-test (2.1.0) + rack (>= 1.3) + rails (7.0.6) + actioncable (= 7.0.6) + actionmailbox (= 7.0.6) + actionmailer (= 7.0.6) + actionpack (= 7.0.6) + actiontext (= 7.0.6) + actionview (= 7.0.6) + activejob (= 7.0.6) + activemodel (= 7.0.6) + activerecord (= 7.0.6) + activestorage (= 7.0.6) + activesupport (= 7.0.6) + bundler (>= 1.15.0) + railties (= 7.0.6) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + railties (7.0.6) + actionpack (= 7.0.6) + activesupport (= 7.0.6) + method_source + rake (>= 12.2) + thor (~> 1.0) + zeitwerk (~> 2.5) + rainbow (3.1.1) + rake (13.1.0) + regexp_parser (2.9.0) + rexml (3.2.6) + rspec (3.12.0) + rspec-core (~> 3.12.0) + rspec-expectations (~> 3.12.0) + rspec-mocks (~> 3.12.0) + rspec-core (3.12.2) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.3) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-mocks (3.12.6) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-support (3.12.1) + rubocop (1.60.1) + json (~> 2.3) + language_server-protocol (>= 3.17.0) + parallel (~> 1.10) + parser (>= 3.3.0.2) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.30.0, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.30.0) + parser (>= 3.2.1.0) + rubocop-capybara (2.20.0) + rubocop (~> 1.41) + rubocop-factory_bot (2.25.1) + rubocop (~> 1.41) + rubocop-performance (1.20.2) + rubocop (>= 1.48.1, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) + rubocop-powerhome (0.5.0) + rubocop + rubocop-performance + rubocop-rails + rubocop-rake + rubocop-rspec + rubocop-rails (2.23.1) + activesupport (>= 4.2.0) + rack (>= 1.1) + rubocop (>= 1.33.0, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) + rubocop-rake (0.6.0) + rubocop (~> 1.0) + rubocop-rspec (2.26.1) + rubocop (~> 1.40) + rubocop-capybara (~> 2.17) + rubocop-factory_bot (~> 2.22) + ruby-progressbar (1.13.0) + rubyzip (2.3.2) + sentry-ruby (5.5.0) + concurrent-ruby (~> 1.0, >= 1.0.2) + thor (1.3.0) + timeout (0.4.1) + tomlrb (2.0.3) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + unicode-display_width (2.5.0) + websocket-driver (0.7.6) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) + with_env (1.1.0) + xml-simple (1.1.9) + rexml + zeitwerk (2.6.12) + +PLATFORMS + arm64-darwin + +DEPENDENCIES + appraisal (~> 2.5.0) + dep_shield! + license_finder (>= 7.0) + rails (= 7.0.6) + rake (~> 13.0) + rspec (~> 3.0) + rubocop (~> 1.21) + rubocop-powerhome (= 0.5.0) + +BUNDLED WITH + 2.5.4 diff --git a/packages/dep_shield/lib/dep_shield.rb b/packages/dep_shield/lib/dep_shield.rb new file mode 100644 index 00000000..8b1992e4 --- /dev/null +++ b/packages/dep_shield/lib/dep_shield.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true + +require "nitro_config" +require "rails/all" +require "sentry-rails" +require "sentry-ruby" + +require_relative "dep_shield/deprecation" +require_relative "dep_shield/todos" +require_relative "dep_shield/version" + +module DepShield + class Error < StandardError + def initialize(message, callstack) + super(message) + + case callstack + when Array + set_backtrace callstack.map(&:to_s) + when Thread::Backtrace::Location, String + set_backtrace [callstack.to_s] + end + end + end + +module_function + + def todos + @todos ||= DepShield::Todos.new + end + + # Takes a deprecation message string. Warns, then raises or reports to Sentry + # + # @param name [String] + # @param message [String] + # @param callstack [Array] + # @yieldparam scope [Scope] + # @return [Event, nil] + def raise_or_capture!(name:, message:, callstack: caller, **) + ::DepShield::Deprecation.new( + name: name, message: message, callstack: callstack + ).raise_or_capture! + end +end diff --git a/packages/dep_shield/lib/dep_shield/deprecation.rb b/packages/dep_shield/lib/dep_shield/deprecation.rb new file mode 100644 index 00000000..efe1ba61 --- /dev/null +++ b/packages/dep_shield/lib/dep_shield/deprecation.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +module DepShield + class Deprecation + attr_reader :name, :error, :stack + + def initialize(name:, message:, callstack:) + @name = name + @stack = cleaner.clean(callstack.map(&:to_s)) + @error = DepShield::Error.new("#{name}:\n#{message}", stack) + end + + def raise_or_capture! + Rails.logger.warn("NITRO DEPRECATION WARNING") { "#{error}\n#{stack}" } + return if DepShield.todos.allowed?(name, stack) + + raise error unless NitroConfig.get("nitro_errors/capture_deprecation") + + Sentry.capture_exception( + error, + tags: { environment: Rails.env, deprecation_error: name } + ) + end + + private + + def cleaner + @cleaner ||= ActiveSupport::BacktraceCleaner.new.tap do |cleaner| + cleaner.add_filter { |line| line.gsub(/^(.*?:.*?):.*/, '\1') } + cleaner.add_silencer { |line| line.include?(ENV.fetch("GEM_HOME", nil)) } + cleaner.add_silencer { |line| line.start_with?("bin/") } + end + end + end +end diff --git a/packages/dep_shield/lib/dep_shield/todos.rb b/packages/dep_shield/lib/dep_shield/todos.rb new file mode 100644 index 00000000..9b2b6dfb --- /dev/null +++ b/packages/dep_shield/lib/dep_shield/todos.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +module DepShield + class Todos + def todo_list + @todo_list ||= begin + paths = Rails.root.glob("**/.deprecation_todo.yml") + + paths.each_with_object({}) do |path, list| + YAML.load_file(path)&.each do |feature_name, dep_todos| + list[feature_name] ||= [] + list[feature_name] += dep_todos + end + end + end + end + + def allowed?(name, stack) + todo_list.fetch(name, []).any? do |allowed_file| + stack.join("\n").include? allowed_file + end + end + end +end diff --git a/packages/dep_shield/lib/dep_shield/version.rb b/packages/dep_shield/lib/dep_shield/version.rb new file mode 100644 index 00000000..5c96697d --- /dev/null +++ b/packages/dep_shield/lib/dep_shield/version.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +module DepShield + VERSION = "0.1.1" +end diff --git a/packages/dep_shield/sig/dep_shield.rbs b/packages/dep_shield/sig/dep_shield.rbs new file mode 100644 index 00000000..2f92545d --- /dev/null +++ b/packages/dep_shield/sig/dep_shield.rbs @@ -0,0 +1,4 @@ +module DepShield + VERSION: String + # See the writing guide of rbs: https://github.com/ruby/rbs#guides +end diff --git a/packages/dep_shield/spec/dep_shield/deprecation_spec.rb b/packages/dep_shield/spec/dep_shield/deprecation_spec.rb new file mode 100644 index 00000000..040ebb99 --- /dev/null +++ b/packages/dep_shield/spec/dep_shield/deprecation_spec.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +require "spec_helper" + +RSpec.describe DepShield::Deprecation do + context "#raise_or_capture!" do + describe "configured to capture_deprecation" do + before do + allow(NitroConfig).to receive(:get).with("nitro_errors/capture_deprecation").and_return true + end + + it "allowlisted" do + expect(Rails.logger).to receive(:warn).with("NITRO DEPRECATION WARNING", any_args) + expect(Sentry).to_not receive(:capture_exception) + + DepShield::Deprecation.new( + name: "test_whitelist", message: "I'm allowlisted!", callstack: ["spec/nitro_errors/deprecation_spec.rb"] + ).raise_or_capture! + end + + it "NOT allowlisted" do + expect(Rails.logger).to receive(:warn).with("NITRO DEPRECATION WARNING", any_args) + expect(Sentry).to receive(:capture_exception) + + DepShield::Deprecation.new( + name: "test", message: "Test!", callstack: ["spec/nitro_errors/deprecation_spec.rb"] + ).raise_or_capture! + end + end + + describe "NOT configured to capture_deprecation" do + before do + allow(NitroConfig).to receive(:get).with("nitro_errors/capture_deprecation").and_return false + end + + it "allowlisted" do + expect(Rails.logger).to receive(:warn).with("NITRO DEPRECATION WARNING", any_args) + expect(Sentry).to_not receive(:capture_exception) + + DepShield::Deprecation.new( + name: "test_whitelist", message: "I'm allowlisted!", callstack: ["spec/nitro_errors/deprecation_spec.rb"] + ).raise_or_capture! + end + + it "NOT allowlisted" do + expect(Rails.logger).to receive(:warn).with("NITRO DEPRECATION WARNING", any_args) + + expect do + DepShield::Deprecation.new( + name: "test", message: "Test!", callstack: ["spec/nitro_errors/deprecation_spec.rb"] + ).raise_or_capture! + end.to raise_error(DepShield::Error) + end + end + end +end diff --git a/packages/dep_shield/spec/dep_shield_spec.rb b/packages/dep_shield/spec/dep_shield_spec.rb new file mode 100644 index 00000000..35078cc3 --- /dev/null +++ b/packages/dep_shield/spec/dep_shield_spec.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +require "spec_helper" + +RSpec.describe DepShield do + it "has a version number" do + expect(DepShield::VERSION).not_to be nil + end + + context "#raise_or_capture!" do + it "invokes Deprecation class" do + args = { name: "my_test_dep", message: "Test message!", callstack: [] } + + expect(DepShield::Deprecation).to receive_message_chain(:new, :raise_or_capture!) + + DepShield.raise_or_capture!(**args) + end + end +end diff --git a/packages/dep_shield/spec/internal/app/assets/config/manifest.js b/packages/dep_shield/spec/internal/app/assets/config/manifest.js new file mode 100644 index 00000000..e69de29b diff --git a/packages/dep_shield/spec/internal/config/.deprecation_todo.yml b/packages/dep_shield/spec/internal/config/.deprecation_todo.yml new file mode 100644 index 00000000..4112dc4c --- /dev/null +++ b/packages/dep_shield/spec/internal/config/.deprecation_todo.yml @@ -0,0 +1,15 @@ +# Using NitroErrors to mark something as deprecated means that it may raise when +# new code using deprecated methods is introduced. +# This file can be used to whitelist preexisting methods so that they will not raise, +# and register a list of todos for places that should be fixed. +# The intention is for the user to remove these configuration records +# one by one as the deprecations are removed from the code base. +# +# More information: https://github.com/powerhome/nitro-web/blob/master/components/nitro_errors/docs/README.md#L1 + +# Example: +# test_deprecation_name: +# - app/controllers/example_controller.rb + +test_whitelist: + - spec/nitro_errors/deprecation_spec.rb diff --git a/packages/dep_shield/spec/internal/config/database.yml b/packages/dep_shield/spec/internal/config/database.yml new file mode 100644 index 00000000..b9781191 --- /dev/null +++ b/packages/dep_shield/spec/internal/config/database.yml @@ -0,0 +1,3 @@ +test: + adapter: sqlite3 + database: db/combustion_test.sqlite diff --git a/packages/dep_shield/spec/internal/config/routes.rb b/packages/dep_shield/spec/internal/config/routes.rb new file mode 100644 index 00000000..878c8133 --- /dev/null +++ b/packages/dep_shield/spec/internal/config/routes.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +Rails.application.routes.draw do + # Add your own routes here, or remove this file if you don't have need for it. +end diff --git a/packages/dep_shield/spec/internal/config/storage.yml b/packages/dep_shield/spec/internal/config/storage.yml new file mode 100644 index 00000000..d128ae31 --- /dev/null +++ b/packages/dep_shield/spec/internal/config/storage.yml @@ -0,0 +1,3 @@ +test: + service: Disk + root: /Users/jk/power-tools/packages/dep_shield/tmp/storage diff --git a/packages/dep_shield/spec/internal/db/schema.rb b/packages/dep_shield/spec/internal/db/schema.rb new file mode 100644 index 00000000..3b396d0e --- /dev/null +++ b/packages/dep_shield/spec/internal/db/schema.rb @@ -0,0 +1,6 @@ +# frozen_string_literal: true + +ActiveRecord::Schema.define do + # Set up any tables you need to exist for your test suite that don't belong + # in migrations. +end diff --git a/packages/dep_shield/spec/internal/log/.gitignore b/packages/dep_shield/spec/internal/log/.gitignore new file mode 100644 index 00000000..bf0824e5 --- /dev/null +++ b/packages/dep_shield/spec/internal/log/.gitignore @@ -0,0 +1 @@ +*.log \ No newline at end of file diff --git a/packages/dep_shield/spec/internal/public/favicon.ico b/packages/dep_shield/spec/internal/public/favicon.ico new file mode 100644 index 00000000..e69de29b diff --git a/packages/dep_shield/spec/spec_helper.rb b/packages/dep_shield/spec/spec_helper.rb new file mode 100644 index 00000000..c0091cef --- /dev/null +++ b/packages/dep_shield/spec/spec_helper.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +require "bundler" +require "dep_shield" +require "rspec/rails" + +Bundler.require :default, :development + +Combustion.initialize! :all + +RSpec.configure do |config| + config.use_transactional_fixtures = true + + # Enable flags like --only-failures and --next-failure + config.example_status_persistence_file_path = ".rspec_status" + + # Disable RSpec exposing methods globally on `Module` and `main` + config.disable_monkey_patching! + + config.expect_with :rspec do |c| + c.syntax = :expect + end +end diff --git a/packages/ostruct-sanitizer/LICENSE.txt b/packages/ostruct-sanitizer/LICENSE.txt index a7177359..fde926f5 100644 --- a/packages/ostruct-sanitizer/LICENSE.txt +++ b/packages/ostruct-sanitizer/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016 Diego Borges +Copyright Power Home Remodeling Group, LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/portal.yml b/portal.yml index f8afa07d..bc2cc0e3 100644 --- a/portal.yml +++ b/portal.yml @@ -226,3 +226,17 @@ spec: system: power-application-framework lifecycle: production subcomponentOf: power-tools +--- +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: dep_shield + title: DepShield + description: >- + Enable alerts about deprecated features & prevent new ones from being introduced. +spec: + type: library + owner: heroes-for-hire + system: power-application-framework + lifecycle: production + subcomponentOf: power-tools