Class: RosettAi::Comply::Checkers::LicenseChecker
- Inherits:
-
Object
- Object
- RosettAi::Comply::Checkers::LicenseChecker
- Defined in:
- lib/rosett_ai/comply/checkers/license_checker.rb
Overview
License compliance checker.
Verifies GPL-3.0-only compatibility of all dependencies, LICENSE file presence, and SPDX header coverage. Uses Gemfile.lock parsing for offline dependency audit.
Constant Summary collapse
- GPL_COMPATIBLE =
[ 'MIT', 'BSD-2-Clause', 'BSD-3-Clause', 'Apache-2.0', 'ISC', 'Zlib', '0BSD', 'Unlicense', 'LGPL-2.0-only', 'LGPL-2.0-or-later', 'LGPL-2.1-only', 'LGPL-2.1-or-later', 'LGPL-3.0-only', 'LGPL-3.0-or-later', 'GPL-2.0-only', 'GPL-2.0-or-later', 'GPL-3.0-only', 'GPL-3.0-or-later', 'Ruby', 'PSF-2.0', 'Artistic-2.0', 'MPL-2.0' ].freeze
- GPL_INCOMPATIBLE =
[ 'AGPL-3.0-only', 'AGPL-3.0-or-later', 'SSPL-1.0', 'BUSL-1.1', 'Proprietary', 'CPAL-1.0', 'EUPL-1.1', 'EUPL-1.2' ].freeze
Instance Method Summary collapse
-
#check ⇒ Array<Hash>
Runs all license compliance checks.
-
#initialize(project_root:, allowlist: []) ⇒ LicenseChecker
constructor
A new instance of LicenseChecker.
Constructor Details
#initialize(project_root:, allowlist: []) ⇒ LicenseChecker
Returns a new instance of LicenseChecker.
28 29 30 31 |
# File 'lib/rosett_ai/comply/checkers/license_checker.rb', line 28 def initialize(project_root:, allowlist: []) @project_root = project_root @allowlist = allowlist end |
Instance Method Details
#check ⇒ Array<Hash>
Runs all license compliance checks.
36 37 38 39 40 41 |
# File 'lib/rosett_ai/comply/checkers/license_checker.rb', line 36 def check [ check_gpl_compatible, check_license_file_present ] end |