diff --git a/.gitignore b/.gitignore index 45de01f3f3..c10b081c15 100644 --- a/.gitignore +++ b/.gitignore @@ -82,6 +82,7 @@ # Ignore dependencies we don't wish to vendor **/vendor/bundle/ruby/*/gems/ast-*/ **/vendor/bundle/ruby/*/gems/bundler-*/ +**/vendor/bundle/ruby/*/gems/byebug-*/ **/vendor/bundle/ruby/*/gems/coderay-*/ **/vendor/bundle/ruby/*/gems/connection_pool-*/ **/vendor/bundle/ruby/*/gems/coveralls-*/ @@ -127,6 +128,8 @@ **/vendor/bundle/ruby/*/gems/simplecov-*/ **/vendor/bundle/ruby/*/gems/simplecov-cobertura-*/ **/vendor/bundle/ruby/*/gems/simplecov-html-*/ +**/vendor/bundle/ruby/*/gems/sorbet-*/ +**/vendor/bundle/ruby/*/gems/sorbet-runtime-*/ **/vendor/bundle/ruby/*/gems/term-ansicolor-*/ **/vendor/bundle/ruby/*/gems/thor-*/ **/vendor/bundle/ruby/*/gems/tins-*/ @@ -134,7 +137,6 @@ **/vendor/bundle/ruby/*/gems/unf-*/ **/vendor/bundle/ruby/*/gems/unicode-display_width-*/ **/vendor/bundle/ruby/*/gems/webrobots-*/ -**/vendor/bundle/ruby/*/gems/byebug-*/ # Ignore `bin` contents (again). /bin diff --git a/Library/Homebrew/Gemfile b/Library/Homebrew/Gemfile index 2c28f3de29..61b165c14f 100644 --- a/Library/Homebrew/Gemfile +++ b/Library/Homebrew/Gemfile @@ -5,6 +5,7 @@ source "https://rubygems.org" # installed gems gem "byebug" gem "coveralls", "~> 0.8", require: false +gem "json", require: false gem "parallel_tests" gem "ronn", require: false gem "rspec" @@ -14,6 +15,11 @@ gem "rspec-wait", require: false gem "rubocop" gem "simplecov", require: false +if ENV["HOMEBREW_SORBET"] + gem "sorbet" + gem "sorbet-runtime" +end + # vendored gems gem "activesupport" gem "concurrent-ruby" diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index 420e9940c4..970e3340a2 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -7,7 +7,7 @@ GEM minitest (~> 5.1) tzinfo (~> 1.1) zeitwerk (~> 2.2, >= 2.2.2) - ast (2.4.0) + ast (2.4.1) byebug (11.1.3) concurrent-ruby (1.1.6) connection_pool (2.2.3) @@ -49,7 +49,7 @@ GEM mini_portile2 (~> 2.4.0) ntlm-http (0.1.1) parallel (1.19.1) - parallel_tests (2.32.0) + parallel_tests (3.0.0) parallel parser (2.7.1.3) ast (~> 2.4.0) @@ -95,7 +95,7 @@ GEM parser (>= 2.7.0.1) rubocop-performance (1.6.1) rubocop (>= 0.71.0) - rubocop-rspec (1.39.0) + rubocop-rspec (1.40.0) rubocop (>= 0.68.1) ruby-macho (2.2.0) ruby-progressbar (1.10.1) @@ -128,6 +128,7 @@ DEPENDENCIES byebug concurrent-ruby coveralls (~> 0.8) + json mechanize parallel_tests plist diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index 092b68a802..1c43a8f181 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -133,8 +133,8 @@ then # shellcheck disable=SC2086,SC2183 printf -v HOMEBREW_MACOS_VERSION_NUMERIC "%02d%02d%02d" ${HOMEBREW_MACOS_VERSION//./ } - # Refuse to run on pre-Mavericks - if [[ "$HOMEBREW_MACOS_VERSION_NUMERIC" -lt "100900" ]] + # Refuse to run on pre-Yosemite + if [[ "$HOMEBREW_MACOS_VERSION_NUMERIC" -lt "101000" ]] then printf "ERROR: Your version of macOS (%s) is too old to run Homebrew!\\n" "$HOMEBREW_MACOS_VERSION" >&2 if [[ "$HOMEBREW_MACOS_VERSION_NUMERIC" -lt "100700" ]] @@ -144,15 +144,6 @@ then printf "\\n" >&2 fi - # The system Curl is too old for some modern HTTPS certificates on - # older macOS versions. - # - if [[ "$HOMEBREW_MACOS_VERSION_NUMERIC" -lt "101000" ]] - then - HOMEBREW_SYSTEM_CURL_TOO_OLD="1" - HOMEBREW_FORCE_BREWED_CURL="1" - fi - # The system Git on macOS versions before Sierra is too old for some Homebrew functionality we rely on. HOMEBREW_MINIMUM_GIT_VERSION="2.14.3" if [[ "$HOMEBREW_MACOS_VERSION_NUMERIC" -lt "101200" ]] diff --git a/Library/Homebrew/cask/audit.rb b/Library/Homebrew/cask/audit.rb index 441509bc38..1556296c32 100644 --- a/Library/Homebrew/cask/audit.rb +++ b/Library/Homebrew/cask/audit.rb @@ -310,10 +310,16 @@ module Cask return if cask.appcast.must_contain == :no_check appcast_stanza = cask.appcast.to_s - appcast_contents, = curl_output("--compressed", "--user-agent", HOMEBREW_USER_AGENT_FAKE_SAFARI, "--location", - "--globoff", "--max-time", "5", appcast_stanza) + appcast_contents, = begin + curl_output("--compressed", "--user-agent", HOMEBREW_USER_AGENT_FAKE_SAFARI, "--location", + "--globoff", "--max-time", "5", appcast_stanza) + rescue + add_error "appcast at URL '#{appcast_stanza}' offline or looping" + return + end + version_stanza = cask.version.to_s - adjusted_version_stanza = if cask.appcast.configuration.blank? + adjusted_version_stanza = if cask.appcast.must_contain.blank? version_stanza.match(/^[[:alnum:].]+/)[0] else cask.appcast.must_contain @@ -322,8 +328,6 @@ module Cask add_warning "appcast at URL '#{appcast_stanza}' does not contain"\ " the version number '#{adjusted_version_stanza}':\n#{appcast_contents}" - rescue - add_error "appcast at URL '#{appcast_stanza}' offline or looping" end def check_github_repository diff --git a/Library/Homebrew/cmd/vendor-install.sh b/Library/Homebrew/cmd/vendor-install.sh index 20e3432989..14ec32e68d 100644 --- a/Library/Homebrew/cmd/vendor-install.sh +++ b/Library/Homebrew/cmd/vendor-install.sh @@ -17,27 +17,17 @@ if [[ -n "$HOMEBREW_MACOS" ]] then if [[ "$HOMEBREW_PROCESSOR" = "Intel" ]] then - ruby_URL="$HOMEBREW_BOTTLE_DOMAIN/bottles-portable-ruby/portable-ruby-2.6.3.mavericks.bottle.tar.gz" - ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.6.3/portable-ruby-2.6.3.mavericks.bottle.tar.gz" - ruby_SHA="ab81211a2052ccaa6d050741c433b728d0641523d8742eef23a5b450811e5104" + ruby_URL="$HOMEBREW_BOTTLE_DOMAIN/bottles-portable-ruby/portable-ruby-2.6.3_1.yosemite.bottle.tar.gz" + ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.6.3_1/portable-ruby-2.6.3_1.yosemite.bottle.tar.gz" + ruby_SHA="be48eade040e13e0e572300ba59cf43d5750f53a4f35d2051966a0194e3c0ab2" fi elif [[ -n "$HOMEBREW_LINUX" ]] then case "$HOMEBREW_PROCESSOR" in x86_64) - ruby_URL="$HOMEBREW_BOTTLE_DOMAIN/bottles-portable-ruby/portable-ruby-2.6.3.x86_64_linux.bottle.tar.gz" - ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.6.3/portable-ruby-2.6.3.x86_64_linux.bottle.tar.gz" - ruby_SHA="e8c9b6d3dc5f40844e07b4b694897b8b7cb5a7dab1013b3b8712a22868f98c98" - ;; - aarch64) - ruby_URL="$HOMEBREW_BOTTLE_DOMAIN/bottles-portable-ruby/portable-ruby-2.6.3.aarch64_linux.bottle.tar.gz" - ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.6.3/portable-ruby-2.6.3.aarch64_linux.bottle.tar.gz" - ruby_SHA="c0b08e2835897af74948508a004d30380b8bcf14264e0dcce194e2c199fb1e35" - ;; - armv[67]*) - ruby_URL="$HOMEBREW_BOTTLE_DOMAIN/bottles-portable-ruby/portable-ruby-2.6.3.armv6_linux.bottle.tar.gz" - ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.6.3/portable-ruby-2.6.3.armv6_linux.bottle.tar.gz" - ruby_SHA="78e36e4671fd08790bfbfda4408d559341c9872bf48a4f6eab78157a3bf3efa6" + ruby_URL="$HOMEBREW_BOTTLE_DOMAIN/bottles-portable-ruby/portable-ruby-2.6.3_1.x86_64_linux.bottle.tar.gz" + ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.6.3_1/portable-ruby-2.6.3_1.x86_64_linux.bottle.tar.gz" + ruby_SHA="f5731ca80497c31ab1171ece4102e2104d9b6cd31aa7b35926e80829d4b0ce29" ;; esac fi diff --git a/Library/Homebrew/data/spdx.json b/Library/Homebrew/data/spdx.json new file mode 100644 index 0000000000..d09c5647e5 --- /dev/null +++ b/Library/Homebrew/data/spdx.json @@ -0,0 +1,2047 @@ +{ + "0BSD": { + "name": "BSD Zero Clause License", + "url": "http://landley.net/toybox/license.html", + "osiApproved": true + }, + "AAL": { + "name": "Attribution Assurance License", + "url": "https://opensource.org/licenses/attribution", + "osiApproved": true + }, + "ADSL": { + "name": "Amazon Digital Services License", + "url": "https://fedoraproject.org/wiki/Licensing/AmazonDigitalServicesLicense", + "osiApproved": false + }, + "AFL-1.1": { + "name": "Academic Free License v1.1", + "url": "http://opensource.linux-mirror.org/licenses/afl-1.1.txt", + "osiApproved": true + }, + "AFL-1.2": { + "name": "Academic Free License v1.2", + "url": "http://opensource.linux-mirror.org/licenses/afl-1.2.txt", + "osiApproved": true + }, + "AFL-2.0": { + "name": "Academic Free License v2.0", + "url": "http://wayback.archive.org/web/20060924134533/http://www.opensource.org/licenses/afl-2.0.txt", + "osiApproved": true + }, + "AFL-2.1": { + "name": "Academic Free License v2.1", + "url": "http://opensource.linux-mirror.org/licenses/afl-2.1.txt", + "osiApproved": true + }, + "AFL-3.0": { + "name": "Academic Free License v3.0", + "url": "http://www.rosenlaw.com/AFL3.0.htm", + "osiApproved": true + }, + "AGPL-1.0": { + "name": "Affero General Public License v1.0", + "url": "http://www.affero.org/oagpl.html", + "osiApproved": false + }, + "AGPL-1.0-only": { + "name": "Affero General Public License v1.0 only", + "url": "http://www.affero.org/oagpl.html", + "osiApproved": false + }, + "AGPL-1.0-or-later": { + "name": "Affero General Public License v1.0 or later", + "url": "http://www.affero.org/oagpl.html", + "osiApproved": false + }, + "AGPL-3.0": { + "name": "GNU Affero General Public License v3.0", + "url": "https://www.gnu.org/licenses/agpl.txt", + "osiApproved": true + }, + "AGPL-3.0-only": { + "name": "GNU Affero General Public License v3.0 only", + "url": "https://www.gnu.org/licenses/agpl.txt", + "osiApproved": true + }, + "AGPL-3.0-or-later": { + "name": "GNU Affero General Public License v3.0 or later", + "url": "https://www.gnu.org/licenses/agpl.txt", + "osiApproved": true + }, + "AMDPLPA": { + "name": "AMD's plpa_map.c License", + "url": "https://fedoraproject.org/wiki/Licensing/AMD_plpa_map_License", + "osiApproved": false + }, + "AML": { + "name": "Apple MIT License", + "url": "https://fedoraproject.org/wiki/Licensing/Apple_MIT_License", + "osiApproved": false + }, + "AMPAS": { + "name": "Academy of Motion Picture Arts and Sciences BSD", + "url": "https://fedoraproject.org/wiki/Licensing/BSD#AMPASBSD", + "osiApproved": false + }, + "ANTLR-PD": { + "name": "ANTLR Software Rights Notice", + "url": "http://www.antlr2.org/license.html", + "osiApproved": false + }, + "APAFML": { + "name": "Adobe Postscript AFM License", + "url": "https://fedoraproject.org/wiki/Licensing/AdobePostscriptAFM", + "osiApproved": false + }, + "APL-1.0": { + "name": "Adaptive Public License 1.0", + "url": "https://opensource.org/licenses/APL-1.0", + "osiApproved": true + }, + "APSL-1.0": { + "name": "Apple Public Source License 1.0", + "url": "https://fedoraproject.org/wiki/Licensing/Apple_Public_Source_License_1.0", + "osiApproved": true + }, + "APSL-1.1": { + "name": "Apple Public Source License 1.1", + "url": "http://www.opensource.apple.com/source/IOSerialFamily/IOSerialFamily-7/APPLE_LICENSE", + "osiApproved": true + }, + "APSL-1.2": { + "name": "Apple Public Source License 1.2", + "url": "http://www.samurajdata.se/opensource/mirror/licenses/apsl.php", + "osiApproved": true + }, + "APSL-2.0": { + "name": "Apple Public Source License 2.0", + "url": "http://www.opensource.apple.com/license/apsl/", + "osiApproved": true + }, + "Abstyles": { + "name": "Abstyles License", + "url": "https://fedoraproject.org/wiki/Licensing/Abstyles", + "osiApproved": false + }, + "Adobe-2006": { + "name": "Adobe Systems Incorporated Source Code License Agreement", + "url": "https://fedoraproject.org/wiki/Licensing/AdobeLicense", + "osiApproved": false + }, + "Adobe-Glyph": { + "name": "Adobe Glyph List License", + "url": "https://fedoraproject.org/wiki/Licensing/MIT#AdobeGlyph", + "osiApproved": false + }, + "Afmparse": { + "name": "Afmparse License", + "url": "https://fedoraproject.org/wiki/Licensing/Afmparse", + "osiApproved": false + }, + "Aladdin": { + "name": "Aladdin Free Public License", + "url": "http://pages.cs.wisc.edu/~ghost/doc/AFPL/6.01/Public.htm", + "osiApproved": false + }, + "Apache-1.0": { + "name": "Apache License 1.0", + "url": "http://www.apache.org/licenses/LICENSE-1.0", + "osiApproved": false + }, + "Apache-1.1": { + "name": "Apache License 1.1", + "url": "http://apache.org/licenses/LICENSE-1.1", + "osiApproved": true + }, + "Apache-2.0": { + "name": "Apache License 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0", + "osiApproved": true + }, + "Artistic-1.0": { + "name": "Artistic License 1.0", + "url": "https://opensource.org/licenses/Artistic-1.0", + "osiApproved": true + }, + "Artistic-1.0-Perl": { + "name": "Artistic License 1.0 (Perl)", + "url": "http://dev.perl.org/licenses/artistic.html", + "osiApproved": true + }, + "Artistic-1.0-cl8": { + "name": "Artistic License 1.0 w/clause 8", + "url": "https://opensource.org/licenses/Artistic-1.0", + "osiApproved": true + }, + "Artistic-2.0": { + "name": "Artistic License 2.0", + "url": "http://www.perlfoundation.org/artistic_license_2_0", + "osiApproved": true + }, + "BSD-1-Clause": { + "name": "BSD 1-Clause License", + "url": "https://svnweb.freebsd.org/base/head/include/ifaddrs.h?revision=326823", + "osiApproved": false + }, + "BSD-2-Clause": { + "name": "BSD 2-Clause \"Simplified\" License", + "url": "https://opensource.org/licenses/BSD-2-Clause", + "osiApproved": true + }, + "BSD-2-Clause-FreeBSD": { + "name": "BSD 2-Clause FreeBSD License", + "url": "http://www.freebsd.org/copyright/freebsd-license.html", + "osiApproved": false + }, + "BSD-2-Clause-NetBSD": { + "name": "BSD 2-Clause NetBSD License", + "url": "http://www.netbsd.org/about/redistribution.html#default", + "osiApproved": false + }, + "BSD-2-Clause-Patent": { + "name": "BSD-2-Clause Plus Patent License", + "url": "https://opensource.org/licenses/BSDplusPatent", + "osiApproved": true + }, + "BSD-3-Clause": { + "name": "BSD 3-Clause \"New\" or \"Revised\" License", + "url": "https://opensource.org/licenses/BSD-3-Clause", + "osiApproved": true + }, + "BSD-3-Clause-Attribution": { + "name": "BSD with attribution", + "url": "https://fedoraproject.org/wiki/Licensing/BSD_with_Attribution", + "osiApproved": false + }, + "BSD-3-Clause-Clear": { + "name": "BSD 3-Clause Clear License", + "url": "http://labs.metacarta.com/license-explanation.html#license", + "osiApproved": false + }, + "BSD-3-Clause-LBNL": { + "name": "Lawrence Berkeley National Labs BSD variant license", + "url": "https://fedoraproject.org/wiki/Licensing/LBNLBSD", + "osiApproved": true + }, + "BSD-3-Clause-No-Nuclear-License": { + "name": "BSD 3-Clause No Nuclear License", + "url": "http://download.oracle.com/otn-pub/java/licenses/bsd.txt?AuthParam=1467140197_43d516ce1776bd08a58235a7785be1cc", + "osiApproved": false + }, + "BSD-3-Clause-No-Nuclear-License-2014": { + "name": "BSD 3-Clause No Nuclear License 2014", + "url": "https://java.net/projects/javaeetutorial/pages/BerkeleyLicense", + "osiApproved": false + }, + "BSD-3-Clause-No-Nuclear-Warranty": { + "name": "BSD 3-Clause No Nuclear Warranty", + "url": "https://jogamp.org/git/?p=gluegen.git;a=blob_plain;f=LICENSE.txt", + "osiApproved": false + }, + "BSD-3-Clause-Open-MPI": { + "name": "BSD 3-Clause Open MPI variant", + "url": "https://www.open-mpi.org/community/license.php", + "osiApproved": false + }, + "BSD-4-Clause": { + "name": "BSD 4-Clause \"Original\" or \"Old\" License", + "url": "http://directory.fsf.org/wiki/License:BSD_4Clause", + "osiApproved": false + }, + "BSD-4-Clause-UC": { + "name": "BSD-4-Clause (University of California-Specific)", + "url": "http://www.freebsd.org/copyright/license.html", + "osiApproved": false + }, + "BSD-Protection": { + "name": "BSD Protection License", + "url": "https://fedoraproject.org/wiki/Licensing/BSD_Protection_License", + "osiApproved": false + }, + "BSD-Source-Code": { + "name": "BSD Source Code Attribution", + "url": "https://github.com/robbiehanson/CocoaHTTPServer/blob/master/LICENSE.txt", + "osiApproved": false + }, + "BSL-1.0": { + "name": "Boost Software License 1.0", + "url": "http://www.boost.org/LICENSE_1_0.txt", + "osiApproved": true + }, + "Bahyph": { + "name": "Bahyph License", + "url": "https://fedoraproject.org/wiki/Licensing/Bahyph", + "osiApproved": false + }, + "Barr": { + "name": "Barr License", + "url": "https://fedoraproject.org/wiki/Licensing/Barr", + "osiApproved": false + }, + "Beerware": { + "name": "Beerware License", + "url": "https://fedoraproject.org/wiki/Licensing/Beerware", + "osiApproved": false + }, + "BitTorrent-1.0": { + "name": "BitTorrent Open Source License v1.0", + "url": "http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/licenses/BitTorrent?r1=1.1&r2=1.1.1.1&diff_format=s", + "osiApproved": false + }, + "BitTorrent-1.1": { + "name": "BitTorrent Open Source License v1.1", + "url": "http://directory.fsf.org/wiki/License:BitTorrentOSL1.1", + "osiApproved": false + }, + "BlueOak-1.0.0": { + "name": "Blue Oak Model License 1.0.0", + "url": "https://blueoakcouncil.org/license/1.0.0", + "osiApproved": false + }, + "Borceux": { + "name": "Borceux license", + "url": "https://fedoraproject.org/wiki/Licensing/Borceux", + "osiApproved": false + }, + "CATOSL-1.1": { + "name": "Computer Associates Trusted Open Source License 1.1", + "url": "https://opensource.org/licenses/CATOSL-1.1", + "osiApproved": true + }, + "CC-BY-1.0": { + "name": "Creative Commons Attribution 1.0 Generic", + "url": "https://creativecommons.org/licenses/by/1.0/legalcode", + "osiApproved": false + }, + "CC-BY-2.0": { + "name": "Creative Commons Attribution 2.0 Generic", + "url": "https://creativecommons.org/licenses/by/2.0/legalcode", + "osiApproved": false + }, + "CC-BY-2.5": { + "name": "Creative Commons Attribution 2.5 Generic", + "url": "https://creativecommons.org/licenses/by/2.5/legalcode", + "osiApproved": false + }, + "CC-BY-3.0": { + "name": "Creative Commons Attribution 3.0 Unported", + "url": "https://creativecommons.org/licenses/by/3.0/legalcode", + "osiApproved": false + }, + "CC-BY-4.0": { + "name": "Creative Commons Attribution 4.0 International", + "url": "https://creativecommons.org/licenses/by/4.0/legalcode", + "osiApproved": false + }, + "CC-BY-NC-1.0": { + "name": "Creative Commons Attribution Non Commercial 1.0 Generic", + "url": "https://creativecommons.org/licenses/by-nc/1.0/legalcode", + "osiApproved": false + }, + "CC-BY-NC-2.0": { + "name": "Creative Commons Attribution Non Commercial 2.0 Generic", + "url": "https://creativecommons.org/licenses/by-nc/2.0/legalcode", + "osiApproved": false + }, + "CC-BY-NC-2.5": { + "name": "Creative Commons Attribution Non Commercial 2.5 Generic", + "url": "https://creativecommons.org/licenses/by-nc/2.5/legalcode", + "osiApproved": false + }, + "CC-BY-NC-3.0": { + "name": "Creative Commons Attribution Non Commercial 3.0 Unported", + "url": "https://creativecommons.org/licenses/by-nc/3.0/legalcode", + "osiApproved": false + }, + "CC-BY-NC-4.0": { + "name": "Creative Commons Attribution Non Commercial 4.0 International", + "url": "https://creativecommons.org/licenses/by-nc/4.0/legalcode", + "osiApproved": false + }, + "CC-BY-NC-ND-1.0": { + "name": "Creative Commons Attribution Non Commercial No Derivatives 1.0 Generic", + "url": "https://creativecommons.org/licenses/by-nd-nc/1.0/legalcode", + "osiApproved": false + }, + "CC-BY-NC-ND-2.0": { + "name": "Creative Commons Attribution Non Commercial No Derivatives 2.0 Generic", + "url": "https://creativecommons.org/licenses/by-nc-nd/2.0/legalcode", + "osiApproved": false + }, + "CC-BY-NC-ND-2.5": { + "name": "Creative Commons Attribution Non Commercial No Derivatives 2.5 Generic", + "url": "https://creativecommons.org/licenses/by-nc-nd/2.5/legalcode", + "osiApproved": false + }, + "CC-BY-NC-ND-3.0": { + "name": "Creative Commons Attribution Non Commercial No Derivatives 3.0 Unported", + "url": "https://creativecommons.org/licenses/by-nc-nd/3.0/legalcode", + "osiApproved": false + }, + "CC-BY-NC-ND-4.0": { + "name": "Creative Commons Attribution Non Commercial No Derivatives 4.0 International", + "url": "https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode", + "osiApproved": false + }, + "CC-BY-NC-SA-1.0": { + "name": "Creative Commons Attribution Non Commercial Share Alike 1.0 Generic", + "url": "https://creativecommons.org/licenses/by-nc-sa/1.0/legalcode", + "osiApproved": false + }, + "CC-BY-NC-SA-2.0": { + "name": "Creative Commons Attribution Non Commercial Share Alike 2.0 Generic", + "url": "https://creativecommons.org/licenses/by-nc-sa/2.0/legalcode", + "osiApproved": false + }, + "CC-BY-NC-SA-2.5": { + "name": "Creative Commons Attribution Non Commercial Share Alike 2.5 Generic", + "url": "https://creativecommons.org/licenses/by-nc-sa/2.5/legalcode", + "osiApproved": false + }, + "CC-BY-NC-SA-3.0": { + "name": "Creative Commons Attribution Non Commercial Share Alike 3.0 Unported", + "url": "https://creativecommons.org/licenses/by-nc-sa/3.0/legalcode", + "osiApproved": false + }, + "CC-BY-NC-SA-4.0": { + "name": "Creative Commons Attribution Non Commercial Share Alike 4.0 International", + "url": "https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode", + "osiApproved": false + }, + "CC-BY-ND-1.0": { + "name": "Creative Commons Attribution No Derivatives 1.0 Generic", + "url": "https://creativecommons.org/licenses/by-nd/1.0/legalcode", + "osiApproved": false + }, + "CC-BY-ND-2.0": { + "name": "Creative Commons Attribution No Derivatives 2.0 Generic", + "url": "https://creativecommons.org/licenses/by-nd/2.0/legalcode", + "osiApproved": false + }, + "CC-BY-ND-2.5": { + "name": "Creative Commons Attribution No Derivatives 2.5 Generic", + "url": "https://creativecommons.org/licenses/by-nd/2.5/legalcode", + "osiApproved": false + }, + "CC-BY-ND-3.0": { + "name": "Creative Commons Attribution No Derivatives 3.0 Unported", + "url": "https://creativecommons.org/licenses/by-nd/3.0/legalcode", + "osiApproved": false + }, + "CC-BY-ND-4.0": { + "name": "Creative Commons Attribution No Derivatives 4.0 International", + "url": "https://creativecommons.org/licenses/by-nd/4.0/legalcode", + "osiApproved": false + }, + "CC-BY-SA-1.0": { + "name": "Creative Commons Attribution Share Alike 1.0 Generic", + "url": "https://creativecommons.org/licenses/by-sa/1.0/legalcode", + "osiApproved": false + }, + "CC-BY-SA-2.0": { + "name": "Creative Commons Attribution Share Alike 2.0 Generic", + "url": "https://creativecommons.org/licenses/by-sa/2.0/legalcode", + "osiApproved": false + }, + "CC-BY-SA-2.5": { + "name": "Creative Commons Attribution Share Alike 2.5 Generic", + "url": "https://creativecommons.org/licenses/by-sa/2.5/legalcode", + "osiApproved": false + }, + "CC-BY-SA-3.0": { + "name": "Creative Commons Attribution Share Alike 3.0 Unported", + "url": "https://creativecommons.org/licenses/by-sa/3.0/legalcode", + "osiApproved": false + }, + "CC-BY-SA-4.0": { + "name": "Creative Commons Attribution Share Alike 4.0 International", + "url": "https://creativecommons.org/licenses/by-sa/4.0/legalcode", + "osiApproved": false + }, + "CC-PDDC": { + "name": "Creative Commons Public Domain Dedication and Certification", + "url": "https://creativecommons.org/licenses/publicdomain/", + "osiApproved": false + }, + "CC0-1.0": { + "name": "Creative Commons Zero v1.0 Universal", + "url": "https://creativecommons.org/publicdomain/zero/1.0/legalcode", + "osiApproved": false + }, + "CDDL-1.0": { + "name": "Common Development and Distribution License 1.0", + "url": "https://opensource.org/licenses/cddl1", + "osiApproved": true + }, + "CDDL-1.1": { + "name": "Common Development and Distribution License 1.1", + "url": "http://glassfish.java.net/public/CDDL+GPL_1_1.html", + "osiApproved": false + }, + "CDLA-Permissive-1.0": { + "name": "Community Data License Agreement Permissive 1.0", + "url": "https://cdla.io/permissive-1-0", + "osiApproved": false + }, + "CDLA-Sharing-1.0": { + "name": "Community Data License Agreement Sharing 1.0", + "url": "https://cdla.io/sharing-1-0", + "osiApproved": false + }, + "CECILL-1.0": { + "name": "CeCILL Free Software License Agreement v1.0", + "url": "http://www.cecill.info/licences/Licence_CeCILL_V1-fr.html", + "osiApproved": false + }, + "CECILL-1.1": { + "name": "CeCILL Free Software License Agreement v1.1", + "url": "http://www.cecill.info/licences/Licence_CeCILL_V1.1-US.html", + "osiApproved": false + }, + "CECILL-2.0": { + "name": "CeCILL Free Software License Agreement v2.0", + "url": "http://www.cecill.info/licences/Licence_CeCILL_V2-en.html", + "osiApproved": false + }, + "CECILL-2.1": { + "name": "CeCILL Free Software License Agreement v2.1", + "url": "http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.html", + "osiApproved": true + }, + "CECILL-B": { + "name": "CeCILL-B Free Software License Agreement", + "url": "http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html", + "osiApproved": false + }, + "CECILL-C": { + "name": "CeCILL-C Free Software License Agreement", + "url": "http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html", + "osiApproved": false + }, + "CERN-OHL-1.1": { + "name": "CERN Open Hardware Licence v1.1", + "url": "https://www.ohwr.org/project/licenses/wikis/cern-ohl-v1.1", + "osiApproved": false + }, + "CERN-OHL-1.2": { + "name": "CERN Open Hardware Licence v1.2", + "url": "https://www.ohwr.org/project/licenses/wikis/cern-ohl-v1.2", + "osiApproved": false + }, + "CNRI-Jython": { + "name": "CNRI Jython License", + "url": "http://www.jython.org/license.html", + "osiApproved": false + }, + "CNRI-Python": { + "name": "CNRI Python License", + "url": "https://opensource.org/licenses/CNRI-Python", + "osiApproved": true + }, + "CNRI-Python-GPL-Compatible": { + "name": "CNRI Python Open Source GPL Compatible License Agreement", + "url": "http://www.python.org/download/releases/1.6.1/download_win/", + "osiApproved": false + }, + "CPAL-1.0": { + "name": "Common Public Attribution License 1.0", + "url": "https://opensource.org/licenses/CPAL-1.0", + "osiApproved": true + }, + "CPL-1.0": { + "name": "Common Public License 1.0", + "url": "https://opensource.org/licenses/CPL-1.0", + "osiApproved": true + }, + "CPOL-1.02": { + "name": "Code Project Open License 1.02", + "url": "http://www.codeproject.com/info/cpol10.aspx", + "osiApproved": false + }, + "CUA-OPL-1.0": { + "name": "CUA Office Public License v1.0", + "url": "https://opensource.org/licenses/CUA-OPL-1.0", + "osiApproved": true + }, + "Caldera": { + "name": "Caldera License", + "url": "http://www.lemis.com/grog/UNIX/ancient-source-all.pdf", + "osiApproved": false + }, + "ClArtistic": { + "name": "Clarified Artistic License", + "url": "http://gianluca.dellavedova.org/2011/01/03/clarified-artistic-license/", + "osiApproved": false + }, + "Condor-1.1": { + "name": "Condor Public License v1.1", + "url": "http://research.cs.wisc.edu/condor/license.html#condor", + "osiApproved": false + }, + "Crossword": { + "name": "Crossword License", + "url": "https://fedoraproject.org/wiki/Licensing/Crossword", + "osiApproved": false + }, + "CrystalStacker": { + "name": "CrystalStacker License", + "url": "https://fedoraproject.org/wiki/Licensing:CrystalStacker?rd=Licensing/CrystalStacker", + "osiApproved": false + }, + "Cube": { + "name": "Cube License", + "url": "https://fedoraproject.org/wiki/Licensing/Cube", + "osiApproved": false + }, + "D-FSL-1.0": { + "name": "Deutsche Freie Software Lizenz", + "url": "http://www.dipp.nrw.de/d-fsl/lizenzen/", + "osiApproved": false + }, + "DOC": { + "name": "DOC License", + "url": "http://www.cs.wustl.edu/~schmidt/ACE-copying.html", + "osiApproved": false + }, + "DSDP": { + "name": "DSDP License", + "url": "https://fedoraproject.org/wiki/Licensing/DSDP", + "osiApproved": false + }, + "Dotseqn": { + "name": "Dotseqn License", + "url": "https://fedoraproject.org/wiki/Licensing/Dotseqn", + "osiApproved": false + }, + "ECL-1.0": { + "name": "Educational Community License v1.0", + "url": "https://opensource.org/licenses/ECL-1.0", + "osiApproved": true + }, + "ECL-2.0": { + "name": "Educational Community License v2.0", + "url": "https://opensource.org/licenses/ECL-2.0", + "osiApproved": true + }, + "EFL-1.0": { + "name": "Eiffel Forum License v1.0", + "url": "http://www.eiffel-nice.org/license/forum.txt", + "osiApproved": true + }, + "EFL-2.0": { + "name": "Eiffel Forum License v2.0", + "url": "http://www.eiffel-nice.org/license/eiffel-forum-license-2.html", + "osiApproved": true + }, + "EPL-1.0": { + "name": "Eclipse Public License 1.0", + "url": "http://www.eclipse.org/legal/epl-v10.html", + "osiApproved": true + }, + "EPL-2.0": { + "name": "Eclipse Public License 2.0", + "url": "https://www.eclipse.org/legal/epl-2.0", + "osiApproved": true + }, + "EUDatagrid": { + "name": "EU DataGrid Software License", + "url": "http://eu-datagrid.web.cern.ch/eu-datagrid/license.html", + "osiApproved": true + }, + "EUPL-1.0": { + "name": "European Union Public License 1.0", + "url": "http://ec.europa.eu/idabc/en/document/7330.html", + "osiApproved": false + }, + "EUPL-1.1": { + "name": "European Union Public License 1.1", + "url": "https://joinup.ec.europa.eu/software/page/eupl/licence-eupl", + "osiApproved": true + }, + "EUPL-1.2": { + "name": "European Union Public License 1.2", + "url": "https://joinup.ec.europa.eu/page/eupl-text-11-12", + "osiApproved": true + }, + "Entessa": { + "name": "Entessa Public License v1.0", + "url": "https://opensource.org/licenses/Entessa", + "osiApproved": true + }, + "ErlPL-1.1": { + "name": "Erlang Public License v1.1", + "url": "http://www.erlang.org/EPLICENSE", + "osiApproved": false + }, + "Eurosym": { + "name": "Eurosym License", + "url": "https://fedoraproject.org/wiki/Licensing/Eurosym", + "osiApproved": false + }, + "FSFAP": { + "name": "FSF All Permissive License", + "url": "https://www.gnu.org/prep/maintain/html_node/License-Notices-for-Other-Files.html", + "osiApproved": false + }, + "FSFUL": { + "name": "FSF Unlimited License", + "url": "https://fedoraproject.org/wiki/Licensing/FSF_Unlimited_License", + "osiApproved": false + }, + "FSFULLR": { + "name": "FSF Unlimited License (with License Retention)", + "url": "https://fedoraproject.org/wiki/Licensing/FSF_Unlimited_License#License_Retention_Variant", + "osiApproved": false + }, + "FTL": { + "name": "Freetype Project License", + "url": "http://freetype.fis.uniroma2.it/FTL.TXT", + "osiApproved": false + }, + "Fair": { + "name": "Fair License", + "url": "http://fairlicense.org/", + "osiApproved": true + }, + "Frameworx-1.0": { + "name": "Frameworx Open License 1.0", + "url": "https://opensource.org/licenses/Frameworx-1.0", + "osiApproved": true + }, + "FreeImage": { + "name": "FreeImage Public License v1.0", + "url": "http://freeimage.sourceforge.net/freeimage-license.txt", + "osiApproved": false + }, + "GFDL-1.1": { + "name": "GNU Free Documentation License v1.1", + "url": "https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt", + "osiApproved": false + }, + "GFDL-1.1-only": { + "name": "GNU Free Documentation License v1.1 only", + "url": "https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt", + "osiApproved": false + }, + "GFDL-1.1-or-later": { + "name": "GNU Free Documentation License v1.1 or later", + "url": "https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt", + "osiApproved": false + }, + "GFDL-1.2": { + "name": "GNU Free Documentation License v1.2", + "url": "https://www.gnu.org/licenses/old-licenses/fdl-1.2.txt", + "osiApproved": false + }, + "GFDL-1.2-only": { + "name": "GNU Free Documentation License v1.2 only", + "url": "https://www.gnu.org/licenses/old-licenses/fdl-1.2.txt", + "osiApproved": false + }, + "GFDL-1.2-or-later": { + "name": "GNU Free Documentation License v1.2 or later", + "url": "https://www.gnu.org/licenses/old-licenses/fdl-1.2.txt", + "osiApproved": false + }, + "GFDL-1.3": { + "name": "GNU Free Documentation License v1.3", + "url": "https://www.gnu.org/licenses/fdl-1.3.txt", + "osiApproved": false + }, + "GFDL-1.3-only": { + "name": "GNU Free Documentation License v1.3 only", + "url": "https://www.gnu.org/licenses/fdl-1.3.txt", + "osiApproved": false + }, + "GFDL-1.3-or-later": { + "name": "GNU Free Documentation License v1.3 or later", + "url": "https://www.gnu.org/licenses/fdl-1.3.txt", + "osiApproved": false + }, + "GL2PS": { + "name": "GL2PS License", + "url": "http://www.geuz.org/gl2ps/COPYING.GL2PS", + "osiApproved": false + }, + "GPL-1.0": { + "name": "GNU General Public License v1.0 only", + "url": "https://www.gnu.org/licenses/old-licenses/gpl-1.0-standalone.html", + "osiApproved": false + }, + "GPL-1.0+": { + "name": "GNU General Public License v1.0 or later", + "url": "https://www.gnu.org/licenses/old-licenses/gpl-1.0-standalone.html", + "osiApproved": false + }, + "GPL-1.0-only": { + "name": "GNU General Public License v1.0 only", + "url": "https://www.gnu.org/licenses/old-licenses/gpl-1.0-standalone.html", + "osiApproved": false + }, + "GPL-1.0-or-later": { + "name": "GNU General Public License v1.0 or later", + "url": "https://www.gnu.org/licenses/old-licenses/gpl-1.0-standalone.html", + "osiApproved": false + }, + "GPL-2.0": { + "name": "GNU General Public License v2.0 only", + "url": "https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html", + "osiApproved": true + }, + "GPL-2.0+": { + "name": "GNU General Public License v2.0 or later", + "url": "https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html", + "osiApproved": true + }, + "GPL-2.0-only": { + "name": "GNU General Public License v2.0 only", + "url": "https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html", + "osiApproved": true + }, + "GPL-2.0-or-later": { + "name": "GNU General Public License v2.0 or later", + "url": "https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html", + "osiApproved": true + }, + "GPL-2.0-with-GCC-exception": { + "name": "GNU General Public License v2.0 w/GCC Runtime Library exception", + "url": "https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/libgcc1.c;h=762f5143fc6eed57b6797c82710f3538aa52b40b;hb=cb143a3ce4fb417c68f5fa2691a1b1b1053dfba9#l10", + "osiApproved": false + }, + "GPL-2.0-with-autoconf-exception": { + "name": "GNU General Public License v2.0 w/Autoconf exception", + "url": "http://ac-archive.sourceforge.net/doc/copyright.html", + "osiApproved": false + }, + "GPL-2.0-with-bison-exception": { + "name": "GNU General Public License v2.0 w/Bison exception", + "url": "http://git.savannah.gnu.org/cgit/bison.git/tree/data/yacc.c?id=193d7c7054ba7197b0789e14965b739162319b5e#n141", + "osiApproved": false + }, + "GPL-2.0-with-classpath-exception": { + "name": "GNU General Public License v2.0 w/Classpath exception", + "url": "https://www.gnu.org/software/classpath/license.html", + "osiApproved": false + }, + "GPL-2.0-with-font-exception": { + "name": "GNU General Public License v2.0 w/Font exception", + "url": "https://www.gnu.org/licenses/gpl-faq.html#FontException", + "osiApproved": false + }, + "GPL-3.0": { + "name": "GNU General Public License v3.0 only", + "url": "https://www.gnu.org/licenses/gpl-3.0-standalone.html", + "osiApproved": true + }, + "GPL-3.0+": { + "name": "GNU General Public License v3.0 or later", + "url": "https://www.gnu.org/licenses/gpl-3.0-standalone.html", + "osiApproved": true + }, + "GPL-3.0-only": { + "name": "GNU General Public License v3.0 only", + "url": "https://www.gnu.org/licenses/gpl-3.0-standalone.html", + "osiApproved": true + }, + "GPL-3.0-or-later": { + "name": "GNU General Public License v3.0 or later", + "url": "https://www.gnu.org/licenses/gpl-3.0-standalone.html", + "osiApproved": true + }, + "GPL-3.0-with-GCC-exception": { + "name": "GNU General Public License v3.0 w/GCC Runtime Library exception", + "url": "https://www.gnu.org/licenses/gcc-exception-3.1.html", + "osiApproved": true + }, + "GPL-3.0-with-autoconf-exception": { + "name": "GNU General Public License v3.0 w/Autoconf exception", + "url": "https://www.gnu.org/licenses/autoconf-exception-3.0.html", + "osiApproved": false + }, + "Giftware": { + "name": "Giftware License", + "url": "http://liballeg.org/license.html#allegro-4-the-giftware-license", + "osiApproved": false + }, + "Glide": { + "name": "3dfx Glide License", + "url": "http://www.users.on.net/~triforce/glidexp/COPYING.txt", + "osiApproved": false + }, + "Glulxe": { + "name": "Glulxe License", + "url": "https://fedoraproject.org/wiki/Licensing/Glulxe", + "osiApproved": false + }, + "HPND": { + "name": "Historical Permission Notice and Disclaimer", + "url": "https://opensource.org/licenses/HPND", + "osiApproved": true + }, + "HPND-sell-variant": { + "name": "Historical Permission Notice and Disclaimer - sell variant", + "url": "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/sunrpc/auth_gss/gss_generic_token.c?h=v4.19", + "osiApproved": false + }, + "HaskellReport": { + "name": "Haskell Language Report License", + "url": "https://fedoraproject.org/wiki/Licensing/Haskell_Language_Report_License", + "osiApproved": false + }, + "IBM-pibs": { + "name": "IBM PowerPC Initialization and Boot Software", + "url": "http://git.denx.de/?p=u-boot.git;a=blob;f=arch/powerpc/cpu/ppc4xx/miiphy.c;h=297155fdafa064b955e53e9832de93bfb0cfb85b;hb=9fab4bf4cc077c21e43941866f3f2c196f28670d", + "osiApproved": false + }, + "ICU": { + "name": "ICU License", + "url": "http://source.icu-project.org/repos/icu/icu/trunk/license.html", + "osiApproved": false + }, + "IJG": { + "name": "Independent JPEG Group License", + "url": "http://dev.w3.org/cvsweb/Amaya/libjpeg/Attic/README?rev=1.2", + "osiApproved": false + }, + "IPA": { + "name": "IPA Font License", + "url": "https://opensource.org/licenses/IPA", + "osiApproved": true + }, + "IPL-1.0": { + "name": "IBM Public License v1.0", + "url": "https://opensource.org/licenses/IPL-1.0", + "osiApproved": true + }, + "ISC": { + "name": "ISC License", + "url": "https://www.isc.org/downloads/software-support-policy/isc-license/", + "osiApproved": true + }, + "ImageMagick": { + "name": "ImageMagick License", + "url": "http://www.imagemagick.org/script/license.php", + "osiApproved": false + }, + "Imlib2": { + "name": "Imlib2 License", + "url": "http://trac.enlightenment.org/e/browser/trunk/imlib2/COPYING", + "osiApproved": false + }, + "Info-ZIP": { + "name": "Info-ZIP License", + "url": "http://www.info-zip.org/license.html", + "osiApproved": false + }, + "Intel": { + "name": "Intel Open Source License", + "url": "https://opensource.org/licenses/Intel", + "osiApproved": true + }, + "Intel-ACPI": { + "name": "Intel ACPI Software License Agreement", + "url": "https://fedoraproject.org/wiki/Licensing/Intel_ACPI_Software_License_Agreement", + "osiApproved": false + }, + "Interbase-1.0": { + "name": "Interbase Public License v1.0", + "url": "https://web.archive.org/web/20060319014854/http://info.borland.com/devsupport/interbase/opensource/IPL.html", + "osiApproved": false + }, + "JPNIC": { + "name": "Japan Network Information Center License", + "url": "https://gitlab.isc.org/isc-projects/bind9/blob/master/COPYRIGHT#L366", + "osiApproved": false + }, + "JSON": { + "name": "JSON License", + "url": "http://www.json.org/license.html", + "osiApproved": false + }, + "JasPer-2.0": { + "name": "JasPer License", + "url": "http://www.ece.uvic.ca/~mdadams/jasper/LICENSE", + "osiApproved": false + }, + "LAL-1.2": { + "name": "Licence Art Libre 1.2", + "url": "http://artlibre.org/licence/lal/licence-art-libre-12/", + "osiApproved": false + }, + "LAL-1.3": { + "name": "Licence Art Libre 1.3", + "url": "https://artlibre.org/", + "osiApproved": false + }, + "LGPL-2.0": { + "name": "GNU Library General Public License v2 only", + "url": "https://www.gnu.org/licenses/old-licenses/lgpl-2.0-standalone.html", + "osiApproved": true + }, + "LGPL-2.0+": { + "name": "GNU Library General Public License v2 or later", + "url": "https://www.gnu.org/licenses/old-licenses/lgpl-2.0-standalone.html", + "osiApproved": true + }, + "LGPL-2.0-only": { + "name": "GNU Library General Public License v2 only", + "url": "https://www.gnu.org/licenses/old-licenses/lgpl-2.0-standalone.html", + "osiApproved": true + }, + "LGPL-2.0-or-later": { + "name": "GNU Library General Public License v2 or later", + "url": "https://www.gnu.org/licenses/old-licenses/lgpl-2.0-standalone.html", + "osiApproved": true + }, + "LGPL-2.1": { + "name": "GNU Lesser General Public License v2.1 only", + "url": "https://www.gnu.org/licenses/old-licenses/lgpl-2.1-standalone.html", + "osiApproved": true + }, + "LGPL-2.1+": { + "name": "GNU Library General Public License v2.1 or later", + "url": "https://www.gnu.org/licenses/old-licenses/lgpl-2.1-standalone.html", + "osiApproved": true + }, + "LGPL-2.1-only": { + "name": "GNU Lesser General Public License v2.1 only", + "url": "https://www.gnu.org/licenses/old-licenses/lgpl-2.1-standalone.html", + "osiApproved": true + }, + "LGPL-2.1-or-later": { + "name": "GNU Lesser General Public License v2.1 or later", + "url": "https://www.gnu.org/licenses/old-licenses/lgpl-2.1-standalone.html", + "osiApproved": true + }, + "LGPL-3.0": { + "name": "GNU Lesser General Public License v3.0 only", + "url": "https://www.gnu.org/licenses/lgpl-3.0-standalone.html", + "osiApproved": true + }, + "LGPL-3.0+": { + "name": "GNU Lesser General Public License v3.0 or later", + "url": "https://www.gnu.org/licenses/lgpl-3.0-standalone.html", + "osiApproved": true + }, + "LGPL-3.0-only": { + "name": "GNU Lesser General Public License v3.0 only", + "url": "https://www.gnu.org/licenses/lgpl-3.0-standalone.html", + "osiApproved": true + }, + "LGPL-3.0-or-later": { + "name": "GNU Lesser General Public License v3.0 or later", + "url": "https://www.gnu.org/licenses/lgpl-3.0-standalone.html", + "osiApproved": true + }, + "LGPLLR": { + "name": "Lesser General Public License For Linguistic Resources", + "url": "http://www-igm.univ-mlv.fr/~unitex/lgpllr.html", + "osiApproved": false + }, + "LPL-1.0": { + "name": "Lucent Public License Version 1.0", + "url": "https://opensource.org/licenses/LPL-1.0", + "osiApproved": true + }, + "LPL-1.02": { + "name": "Lucent Public License v1.02", + "url": "http://plan9.bell-labs.com/plan9/license.html", + "osiApproved": true + }, + "LPPL-1.0": { + "name": "LaTeX Project Public License v1.0", + "url": "http://www.latex-project.org/lppl/lppl-1-0.txt", + "osiApproved": false + }, + "LPPL-1.1": { + "name": "LaTeX Project Public License v1.1", + "url": "http://www.latex-project.org/lppl/lppl-1-1.txt", + "osiApproved": false + }, + "LPPL-1.2": { + "name": "LaTeX Project Public License v1.2", + "url": "http://www.latex-project.org/lppl/lppl-1-2.txt", + "osiApproved": false + }, + "LPPL-1.3a": { + "name": "LaTeX Project Public License v1.3a", + "url": "http://www.latex-project.org/lppl/lppl-1-3a.txt", + "osiApproved": false + }, + "LPPL-1.3c": { + "name": "LaTeX Project Public License v1.3c", + "url": "http://www.latex-project.org/lppl/lppl-1-3c.txt", + "osiApproved": true + }, + "Latex2e": { + "name": "Latex2e License", + "url": "https://fedoraproject.org/wiki/Licensing/Latex2e", + "osiApproved": false + }, + "Leptonica": { + "name": "Leptonica License", + "url": "https://fedoraproject.org/wiki/Licensing/Leptonica", + "osiApproved": false + }, + "LiLiQ-P-1.1": { + "name": "Licence Libre du Québec – Permissive version 1.1", + "url": "https://forge.gouv.qc.ca/licence/fr/liliq-v1-1/", + "osiApproved": true + }, + "LiLiQ-R-1.1": { + "name": "Licence Libre du Québec – Réciprocité version 1.1", + "url": "https://www.forge.gouv.qc.ca/participez/licence-logicielle/licence-libre-du-quebec-liliq-en-francais/licence-libre-du-quebec-reciprocite-liliq-r-v1-1/", + "osiApproved": true + }, + "LiLiQ-Rplus-1.1": { + "name": "Licence Libre du Québec – Réciprocité forte version 1.1", + "url": "https://www.forge.gouv.qc.ca/participez/licence-logicielle/licence-libre-du-quebec-liliq-en-francais/licence-libre-du-quebec-reciprocite-forte-liliq-r-v1-1/", + "osiApproved": true + }, + "Libpng": { + "name": "libpng License", + "url": "http://www.libpng.org/pub/png/src/libpng-LICENSE.txt", + "osiApproved": false + }, + "Linux-OpenIB": { + "name": "Linux Kernel Variant of OpenIB.org license", + "url": "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/infiniband/core/sa.h", + "osiApproved": false + }, + "MIT": { + "name": "MIT License", + "url": "https://opensource.org/licenses/MIT", + "osiApproved": true + }, + "MIT-0": { + "name": "MIT No Attribution", + "url": "https://github.com/aws/mit-0", + "osiApproved": false + }, + "MIT-CMU": { + "name": "CMU License", + "url": "https://fedoraproject.org/wiki/Licensing:MIT?rd=Licensing/MIT#CMU_Style", + "osiApproved": false + }, + "MIT-advertising": { + "name": "Enlightenment License (e16)", + "url": "https://fedoraproject.org/wiki/Licensing/MIT_With_Advertising", + "osiApproved": false + }, + "MIT-enna": { + "name": "enna License", + "url": "https://fedoraproject.org/wiki/Licensing/MIT#enna", + "osiApproved": false + }, + "MIT-feh": { + "name": "feh License", + "url": "https://fedoraproject.org/wiki/Licensing/MIT#feh", + "osiApproved": false + }, + "MITNFA": { + "name": "MIT +no-false-attribs license", + "url": "https://fedoraproject.org/wiki/Licensing/MITNFA", + "osiApproved": false + }, + "MPL-1.0": { + "name": "Mozilla Public License 1.0", + "url": "http://www.mozilla.org/MPL/MPL-1.0.html", + "osiApproved": true + }, + "MPL-1.1": { + "name": "Mozilla Public License 1.1", + "url": "http://www.mozilla.org/MPL/MPL-1.1.html", + "osiApproved": true + }, + "MPL-2.0": { + "name": "Mozilla Public License 2.0", + "url": "http://www.mozilla.org/MPL/2.0/", + "osiApproved": true + }, + "MPL-2.0-no-copyleft-exception": { + "name": "Mozilla Public License 2.0 (no copyleft exception)", + "url": "http://www.mozilla.org/MPL/2.0/", + "osiApproved": true + }, + "MS-PL": { + "name": "Microsoft Public License", + "url": "http://www.microsoft.com/opensource/licenses.mspx", + "osiApproved": true + }, + "MS-RL": { + "name": "Microsoft Reciprocal License", + "url": "http://www.microsoft.com/opensource/licenses.mspx", + "osiApproved": true + }, + "MTLL": { + "name": "Matrix Template Library License", + "url": "https://fedoraproject.org/wiki/Licensing/Matrix_Template_Library_License", + "osiApproved": false + }, + "MakeIndex": { + "name": "MakeIndex License", + "url": "https://fedoraproject.org/wiki/Licensing/MakeIndex", + "osiApproved": false + }, + "MirOS": { + "name": "The MirOS Licence", + "url": "https://opensource.org/licenses/MirOS", + "osiApproved": true + }, + "Motosoto": { + "name": "Motosoto License", + "url": "https://opensource.org/licenses/Motosoto", + "osiApproved": true + }, + "MulanPSL-1.0": { + "name": "Mulan Permissive Software License, Version 1", + "url": "https://license.coscl.org.cn/MulanPSL/", + "osiApproved": false + }, + "Multics": { + "name": "Multics License", + "url": "https://opensource.org/licenses/Multics", + "osiApproved": true + }, + "Mup": { + "name": "Mup License", + "url": "https://fedoraproject.org/wiki/Licensing/Mup", + "osiApproved": false + }, + "NASA-1.3": { + "name": "NASA Open Source Agreement 1.3", + "url": "http://ti.arc.nasa.gov/opensource/nosa/", + "osiApproved": true + }, + "NBPL-1.0": { + "name": "Net Boolean Public License v1", + "url": "http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=blob;f=LICENSE;hb=37b4b3f6cc4bf34e1d3dec61e69914b9819d8894", + "osiApproved": false + }, + "NCSA": { + "name": "University of Illinois/NCSA Open Source License", + "url": "http://otm.illinois.edu/uiuc_openSource", + "osiApproved": true + }, + "NGPL": { + "name": "Nethack General Public License", + "url": "https://opensource.org/licenses/NGPL", + "osiApproved": true + }, + "NLOD-1.0": { + "name": "Norwegian Licence for Open Government Data", + "url": "http://data.norge.no/nlod/en/1.0", + "osiApproved": false + }, + "NLPL": { + "name": "No Limit Public License", + "url": "https://fedoraproject.org/wiki/Licensing/NLPL", + "osiApproved": false + }, + "NOSL": { + "name": "Netizen Open Source License", + "url": "http://bits.netizen.com.au/licenses/NOSL/nosl.txt", + "osiApproved": false + }, + "NPL-1.0": { + "name": "Netscape Public License v1.0", + "url": "http://www.mozilla.org/MPL/NPL/1.0/", + "osiApproved": false + }, + "NPL-1.1": { + "name": "Netscape Public License v1.1", + "url": "http://www.mozilla.org/MPL/NPL/1.1/", + "osiApproved": false + }, + "NPOSL-3.0": { + "name": "Non-Profit Open Software License 3.0", + "url": "https://opensource.org/licenses/NOSL3.0", + "osiApproved": true + }, + "NRL": { + "name": "NRL License", + "url": "http://web.mit.edu/network/isakmp/nrllicense.html", + "osiApproved": false + }, + "NTP": { + "name": "NTP License", + "url": "https://opensource.org/licenses/NTP", + "osiApproved": true + }, + "NTP-0": { + "name": "NTP No Attribution", + "url": "https://github.com/tytso/e2fsprogs/blob/master/lib/et/et_name.c", + "osiApproved": false + }, + "Naumen": { + "name": "Naumen Public License", + "url": "https://opensource.org/licenses/Naumen", + "osiApproved": true + }, + "Net-SNMP": { + "name": "Net-SNMP License", + "url": "http://net-snmp.sourceforge.net/about/license.html", + "osiApproved": false + }, + "NetCDF": { + "name": "NetCDF license", + "url": "http://www.unidata.ucar.edu/software/netcdf/copyright.html", + "osiApproved": false + }, + "Newsletr": { + "name": "Newsletr License", + "url": "https://fedoraproject.org/wiki/Licensing/Newsletr", + "osiApproved": false + }, + "Nokia": { + "name": "Nokia Open Source License", + "url": "https://opensource.org/licenses/nokia", + "osiApproved": true + }, + "Noweb": { + "name": "Noweb License", + "url": "https://fedoraproject.org/wiki/Licensing/Noweb", + "osiApproved": false + }, + "Nunit": { + "name": "Nunit License", + "url": "https://fedoraproject.org/wiki/Licensing/Nunit", + "osiApproved": false + }, + "OCCT-PL": { + "name": "Open CASCADE Technology Public License", + "url": "http://www.opencascade.com/content/occt-public-license", + "osiApproved": false + }, + "OCLC-2.0": { + "name": "OCLC Research Public License 2.0", + "url": "http://www.oclc.org/research/activities/software/license/v2final.htm", + "osiApproved": true + }, + "ODC-By-1.0": { + "name": "Open Data Commons Attribution License v1.0", + "url": "https://opendatacommons.org/licenses/by/1.0/", + "osiApproved": false + }, + "ODbL-1.0": { + "name": "ODC Open Database License v1.0", + "url": "http://www.opendatacommons.org/licenses/odbl/1.0/", + "osiApproved": false + }, + "OFL-1.0": { + "name": "SIL Open Font License 1.0", + "url": "http://scripts.sil.org/cms/scripts/page.php?item_id=OFL10_web", + "osiApproved": false + }, + "OFL-1.0-RFN": { + "name": "SIL Open Font License 1.0 with Reserved Font Name", + "url": "http://scripts.sil.org/cms/scripts/page.php?item_id=OFL10_web", + "osiApproved": false + }, + "OFL-1.0-no-RFN": { + "name": "SIL Open Font License 1.0 with no Reserved Font Name", + "url": "http://scripts.sil.org/cms/scripts/page.php?item_id=OFL10_web", + "osiApproved": false + }, + "OFL-1.1": { + "name": "SIL Open Font License 1.1", + "url": "http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web", + "osiApproved": true + }, + "OFL-1.1-RFN": { + "name": "SIL Open Font License 1.1 with Reserved Font Name", + "url": "http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web", + "osiApproved": true + }, + "OFL-1.1-no-RFN": { + "name": "SIL Open Font License 1.1 with no Reserved Font Name", + "url": "http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web", + "osiApproved": true + }, + "OGL-Canada-2.0": { + "name": "Open Government Licence - Canada", + "url": "https://open.canada.ca/en/open-government-licence-canada", + "osiApproved": false + }, + "OGL-UK-1.0": { + "name": "Open Government Licence v1.0", + "url": "http://www.nationalarchives.gov.uk/doc/open-government-licence/version/1/", + "osiApproved": false + }, + "OGL-UK-2.0": { + "name": "Open Government Licence v2.0", + "url": "http://www.nationalarchives.gov.uk/doc/open-government-licence/version/2/", + "osiApproved": false + }, + "OGL-UK-3.0": { + "name": "Open Government Licence v3.0", + "url": "http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/", + "osiApproved": false + }, + "OGTSL": { + "name": "Open Group Test Suite License", + "url": "http://www.opengroup.org/testing/downloads/The_Open_Group_TSL.txt", + "osiApproved": true + }, + "OLDAP-1.1": { + "name": "Open LDAP Public License v1.1", + "url": "http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=blob;f=LICENSE;hb=806557a5ad59804ef3a44d5abfbe91d706b0791f", + "osiApproved": false + }, + "OLDAP-1.2": { + "name": "Open LDAP Public License v1.2", + "url": "http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=blob;f=LICENSE;hb=42b0383c50c299977b5893ee695cf4e486fb0dc7", + "osiApproved": false + }, + "OLDAP-1.3": { + "name": "Open LDAP Public License v1.3", + "url": "http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=blob;f=LICENSE;hb=e5f8117f0ce088d0bd7a8e18ddf37eaa40eb09b1", + "osiApproved": false + }, + "OLDAP-1.4": { + "name": "Open LDAP Public License v1.4", + "url": "http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=blob;f=LICENSE;hb=c9f95c2f3f2ffb5e0ae55fe7388af75547660941", + "osiApproved": false + }, + "OLDAP-2.0": { + "name": "Open LDAP Public License v2.0 (or possibly 2.0A and 2.0B)", + "url": "http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=blob;f=LICENSE;hb=cbf50f4e1185a21abd4c0a54d3f4341fe28f36ea", + "osiApproved": false + }, + "OLDAP-2.0.1": { + "name": "Open LDAP Public License v2.0.1", + "url": "http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=blob;f=LICENSE;hb=b6d68acd14e51ca3aab4428bf26522aa74873f0e", + "osiApproved": false + }, + "OLDAP-2.1": { + "name": "Open LDAP Public License v2.1", + "url": "http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=blob;f=LICENSE;hb=b0d176738e96a0d3b9f85cb51e140a86f21be715", + "osiApproved": false + }, + "OLDAP-2.2": { + "name": "Open LDAP Public License v2.2", + "url": "http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=blob;f=LICENSE;hb=470b0c18ec67621c85881b2733057fecf4a1acc3", + "osiApproved": false + }, + "OLDAP-2.2.1": { + "name": "Open LDAP Public License v2.2.1", + "url": "http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=blob;f=LICENSE;hb=4bc786f34b50aa301be6f5600f58a980070f481e", + "osiApproved": false + }, + "OLDAP-2.2.2": { + "name": "Open LDAP Public License 2.2.2", + "url": "http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=blob;f=LICENSE;hb=df2cc1e21eb7c160695f5b7cffd6296c151ba188", + "osiApproved": false + }, + "OLDAP-2.3": { + "name": "Open LDAP Public License v2.3", + "url": "http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=blob;f=LICENSE;hb=d32cf54a32d581ab475d23c810b0a7fbaf8d63c3", + "osiApproved": false + }, + "OLDAP-2.4": { + "name": "Open LDAP Public License v2.4", + "url": "http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=blob;f=LICENSE;hb=cd1284c4a91a8a380d904eee68d1583f989ed386", + "osiApproved": false + }, + "OLDAP-2.5": { + "name": "Open LDAP Public License v2.5", + "url": "http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=blob;f=LICENSE;hb=6852b9d90022e8593c98205413380536b1b5a7cf", + "osiApproved": false + }, + "OLDAP-2.6": { + "name": "Open LDAP Public License v2.6", + "url": "http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=blob;f=LICENSE;hb=1cae062821881f41b73012ba816434897abf4205", + "osiApproved": false + }, + "OLDAP-2.7": { + "name": "Open LDAP Public License v2.7", + "url": "http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=blob;f=LICENSE;hb=47c2415c1df81556eeb39be6cad458ef87c534a2", + "osiApproved": false + }, + "OLDAP-2.8": { + "name": "Open LDAP Public License v2.8", + "url": "http://www.openldap.org/software/release/license.html", + "osiApproved": false + }, + "OML": { + "name": "Open Market License", + "url": "https://fedoraproject.org/wiki/Licensing/Open_Market_License", + "osiApproved": false + }, + "OPL-1.0": { + "name": "Open Public License v1.0", + "url": "http://old.koalateam.com/jackaroo/OPL_1_0.TXT", + "osiApproved": false + }, + "OSET-PL-2.1": { + "name": "OSET Public License version 2.1", + "url": "http://www.osetfoundation.org/public-license", + "osiApproved": true + }, + "OSL-1.0": { + "name": "Open Software License 1.0", + "url": "https://opensource.org/licenses/OSL-1.0", + "osiApproved": true + }, + "OSL-1.1": { + "name": "Open Software License 1.1", + "url": "https://fedoraproject.org/wiki/Licensing/OSL1.1", + "osiApproved": false + }, + "OSL-2.0": { + "name": "Open Software License 2.0", + "url": "http://web.archive.org/web/20041020171434/http://www.rosenlaw.com/osl2.0.html", + "osiApproved": true + }, + "OSL-2.1": { + "name": "Open Software License 2.1", + "url": "http://web.archive.org/web/20050212003940/http://www.rosenlaw.com/osl21.htm", + "osiApproved": true + }, + "OSL-3.0": { + "name": "Open Software License 3.0", + "url": "https://web.archive.org/web/20120101081418/http://rosenlaw.com:80/OSL3.0.htm", + "osiApproved": true + }, + "OpenSSL": { + "name": "OpenSSL License", + "url": "http://www.openssl.org/source/license.html", + "osiApproved": false + }, + "PDDL-1.0": { + "name": "ODC Public Domain Dedication & License 1.0", + "url": "http://opendatacommons.org/licenses/pddl/1.0/", + "osiApproved": false + }, + "PHP-3.0": { + "name": "PHP License v3.0", + "url": "http://www.php.net/license/3_0.txt", + "osiApproved": true + }, + "PHP-3.01": { + "name": "PHP License v3.01", + "url": "http://www.php.net/license/3_01.txt", + "osiApproved": false + }, + "PSF-2.0": { + "name": "Python Software Foundation License 2.0", + "url": "https://opensource.org/licenses/Python-2.0", + "osiApproved": false + }, + "Parity-6.0.0": { + "name": "The Parity Public License 6.0.0", + "url": "https://paritylicense.com/versions/6.0.0.html", + "osiApproved": false + }, + "Plexus": { + "name": "Plexus Classworlds License", + "url": "https://fedoraproject.org/wiki/Licensing/Plexus_Classworlds_License", + "osiApproved": false + }, + "PostgreSQL": { + "name": "PostgreSQL License", + "url": "http://www.postgresql.org/about/licence", + "osiApproved": true + }, + "Python-2.0": { + "name": "Python License 2.0", + "url": "https://opensource.org/licenses/Python-2.0", + "osiApproved": true + }, + "QPL-1.0": { + "name": "Q Public License 1.0", + "url": "http://doc.qt.nokia.com/3.3/license.html", + "osiApproved": true + }, + "Qhull": { + "name": "Qhull License", + "url": "https://fedoraproject.org/wiki/Licensing/Qhull", + "osiApproved": false + }, + "RHeCos-1.1": { + "name": "Red Hat eCos Public License v1.1", + "url": "http://ecos.sourceware.org/old-license.html", + "osiApproved": false + }, + "RPL-1.1": { + "name": "Reciprocal Public License 1.1", + "url": "https://opensource.org/licenses/RPL-1.1", + "osiApproved": true + }, + "RPL-1.5": { + "name": "Reciprocal Public License 1.5", + "url": "https://opensource.org/licenses/RPL-1.5", + "osiApproved": true + }, + "RPSL-1.0": { + "name": "RealNetworks Public Source License v1.0", + "url": "https://helixcommunity.org/content/rpsl", + "osiApproved": true + }, + "RSA-MD": { + "name": "RSA Message-Digest License ", + "url": "http://www.faqs.org/rfcs/rfc1321.html", + "osiApproved": false + }, + "RSCPL": { + "name": "Ricoh Source Code Public License", + "url": "http://wayback.archive.org/web/20060715140826/http://www.risource.org/RPL/RPL-1.0A.shtml", + "osiApproved": true + }, + "Rdisc": { + "name": "Rdisc License", + "url": "https://fedoraproject.org/wiki/Licensing/Rdisc_License", + "osiApproved": false + }, + "Ruby": { + "name": "Ruby License", + "url": "http://www.ruby-lang.org/en/LICENSE.txt", + "osiApproved": false + }, + "SAX-PD": { + "name": "Sax Public Domain Notice", + "url": "http://www.saxproject.org/copying.html", + "osiApproved": false + }, + "SCEA": { + "name": "SCEA Shared Source License", + "url": "http://research.scea.com/scea_shared_source_license.html", + "osiApproved": false + }, + "SGI-B-1.0": { + "name": "SGI Free Software License B v1.0", + "url": "http://oss.sgi.com/projects/FreeB/SGIFreeSWLicB.1.0.html", + "osiApproved": false + }, + "SGI-B-1.1": { + "name": "SGI Free Software License B v1.1", + "url": "http://oss.sgi.com/projects/FreeB/", + "osiApproved": false + }, + "SGI-B-2.0": { + "name": "SGI Free Software License B v2.0", + "url": "http://oss.sgi.com/projects/FreeB/SGIFreeSWLicB.2.0.pdf", + "osiApproved": false + }, + "SHL-0.5": { + "name": "Solderpad Hardware License v0.5", + "url": "https://solderpad.org/licenses/SHL-0.5/", + "osiApproved": false + }, + "SHL-0.51": { + "name": "Solderpad Hardware License, Version 0.51", + "url": "https://solderpad.org/licenses/SHL-0.51/", + "osiApproved": false + }, + "SISSL": { + "name": "Sun Industry Standards Source License v1.1", + "url": "http://www.openoffice.org/licenses/sissl_license.html", + "osiApproved": true + }, + "SISSL-1.2": { + "name": "Sun Industry Standards Source License v1.2", + "url": "http://gridscheduler.sourceforge.net/Gridengine_SISSL_license.html", + "osiApproved": false + }, + "SMLNJ": { + "name": "Standard ML of New Jersey License", + "url": "https://www.smlnj.org/license.html", + "osiApproved": false + }, + "SMPPL": { + "name": "Secure Messaging Protocol Public License", + "url": "https://github.com/dcblake/SMP/blob/master/Documentation/License.txt", + "osiApproved": false + }, + "SNIA": { + "name": "SNIA Public License 1.1", + "url": "https://fedoraproject.org/wiki/Licensing/SNIA_Public_License", + "osiApproved": false + }, + "SPL-1.0": { + "name": "Sun Public License v1.0", + "url": "https://opensource.org/licenses/SPL-1.0", + "osiApproved": true + }, + "SSH-OpenSSH": { + "name": "SSH OpenSSH license", + "url": "https://github.com/openssh/openssh-portable/blob/1b11ea7c58cd5c59838b5fa574cd456d6047b2d4/LICENCE#L10", + "osiApproved": false + }, + "SSH-short": { + "name": "SSH short notice", + "url": "https://github.com/openssh/openssh-portable/blob/1b11ea7c58cd5c59838b5fa574cd456d6047b2d4/pathnames.h", + "osiApproved": false + }, + "SSPL-1.0": { + "name": "Server Side Public License, v 1", + "url": "https://www.mongodb.com/licensing/server-side-public-license", + "osiApproved": false + }, + "SWL": { + "name": "Scheme Widget Library (SWL) Software License Agreement", + "url": "https://fedoraproject.org/wiki/Licensing/SWL", + "osiApproved": false + }, + "Saxpath": { + "name": "Saxpath License", + "url": "https://fedoraproject.org/wiki/Licensing/Saxpath_License", + "osiApproved": false + }, + "Sendmail": { + "name": "Sendmail License", + "url": "http://www.sendmail.com/pdfs/open_source/sendmail_license.pdf", + "osiApproved": false + }, + "Sendmail-8.23": { + "name": "Sendmail License 8.23", + "url": "https://www.proofpoint.com/sites/default/files/sendmail-license.pdf", + "osiApproved": false + }, + "SimPL-2.0": { + "name": "Simple Public License 2.0", + "url": "https://opensource.org/licenses/SimPL-2.0", + "osiApproved": true + }, + "Sleepycat": { + "name": "Sleepycat License", + "url": "https://opensource.org/licenses/Sleepycat", + "osiApproved": true + }, + "Spencer-86": { + "name": "Spencer License 86", + "url": "https://fedoraproject.org/wiki/Licensing/Henry_Spencer_Reg-Ex_Library_License", + "osiApproved": false + }, + "Spencer-94": { + "name": "Spencer License 94", + "url": "https://fedoraproject.org/wiki/Licensing/Henry_Spencer_Reg-Ex_Library_License", + "osiApproved": false + }, + "Spencer-99": { + "name": "Spencer License 99", + "url": "http://www.opensource.apple.com/source/tcl/tcl-5/tcl/generic/regfronts.c", + "osiApproved": false + }, + "StandardML-NJ": { + "name": "Standard ML of New Jersey License", + "url": "http://www.smlnj.org//license.html", + "osiApproved": false + }, + "SugarCRM-1.1.3": { + "name": "SugarCRM Public License v1.1.3", + "url": "http://www.sugarcrm.com/crm/SPL", + "osiApproved": false + }, + "TAPR-OHL-1.0": { + "name": "TAPR Open Hardware License v1.0", + "url": "https://www.tapr.org/OHL", + "osiApproved": false + }, + "TCL": { + "name": "TCL/TK License", + "url": "http://www.tcl.tk/software/tcltk/license.html", + "osiApproved": false + }, + "TCP-wrappers": { + "name": "TCP Wrappers License", + "url": "http://rc.quest.com/topics/openssh/license.php#tcpwrappers", + "osiApproved": false + }, + "TMate": { + "name": "TMate Open Source License", + "url": "http://svnkit.com/license.html", + "osiApproved": false + }, + "TORQUE-1.1": { + "name": "TORQUE v2.5+ Software License v1.1", + "url": "https://fedoraproject.org/wiki/Licensing/TORQUEv1.1", + "osiApproved": false + }, + "TOSL": { + "name": "Trusster Open Source License", + "url": "https://fedoraproject.org/wiki/Licensing/TOSL", + "osiApproved": false + }, + "TU-Berlin-1.0": { + "name": "Technische Universitaet Berlin License 1.0", + "url": "https://github.com/swh/ladspa/blob/7bf6f3799fdba70fda297c2d8fd9f526803d9680/gsm/COPYRIGHT", + "osiApproved": false + }, + "TU-Berlin-2.0": { + "name": "Technische Universitaet Berlin License 2.0", + "url": "https://github.com/CorsixTH/deps/blob/fd339a9f526d1d9c9f01ccf39e438a015da50035/licences/libgsm.txt", + "osiApproved": false + }, + "UCL-1.0": { + "name": "Upstream Compatibility License v1.0", + "url": "https://opensource.org/licenses/UCL-1.0", + "osiApproved": true + }, + "UPL-1.0": { + "name": "Universal Permissive License v1.0", + "url": "https://opensource.org/licenses/UPL", + "osiApproved": true + }, + "Unicode-DFS-2015": { + "name": "Unicode License Agreement - Data Files and Software (2015)", + "url": "https://web.archive.org/web/20151224134844/http://unicode.org/copyright.html", + "osiApproved": false + }, + "Unicode-DFS-2016": { + "name": "Unicode License Agreement - Data Files and Software (2016)", + "url": "http://www.unicode.org/copyright.html", + "osiApproved": false + }, + "Unicode-TOU": { + "name": "Unicode Terms of Use", + "url": "http://www.unicode.org/copyright.html", + "osiApproved": false + }, + "Unlicense": { + "name": "The Unlicense", + "url": "https://unlicense.org/", + "osiApproved": false + }, + "VOSTROM": { + "name": "VOSTROM Public License for Open Source", + "url": "https://fedoraproject.org/wiki/Licensing/VOSTROM", + "osiApproved": false + }, + "VSL-1.0": { + "name": "Vovida Software License v1.0", + "url": "https://opensource.org/licenses/VSL-1.0", + "osiApproved": true + }, + "Vim": { + "name": "Vim License", + "url": "http://vimdoc.sourceforge.net/htmldoc/uganda.html", + "osiApproved": false + }, + "W3C": { + "name": "W3C Software Notice and License (2002-12-31)", + "url": "http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231.html", + "osiApproved": true + }, + "W3C-19980720": { + "name": "W3C Software Notice and License (1998-07-20)", + "url": "http://www.w3.org/Consortium/Legal/copyright-software-19980720.html", + "osiApproved": false + }, + "W3C-20150513": { + "name": "W3C Software Notice and Document License (2015-05-13)", + "url": "https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document", + "osiApproved": false + }, + "WTFPL": { + "name": "Do What The F*ck You Want To Public License", + "url": "http://sam.zoy.org/wtfpl/COPYING", + "osiApproved": false + }, + "Watcom-1.0": { + "name": "Sybase Open Watcom Public License 1.0", + "url": "https://opensource.org/licenses/Watcom-1.0", + "osiApproved": true + }, + "Wsuipa": { + "name": "Wsuipa License", + "url": "https://fedoraproject.org/wiki/Licensing/Wsuipa", + "osiApproved": false + }, + "X11": { + "name": "X11 License", + "url": "http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3", + "osiApproved": false + }, + "XFree86-1.1": { + "name": "XFree86 License 1.1", + "url": "http://www.xfree86.org/current/LICENSE4.html", + "osiApproved": false + }, + "XSkat": { + "name": "XSkat License", + "url": "https://fedoraproject.org/wiki/Licensing/XSkat_License", + "osiApproved": false + }, + "Xerox": { + "name": "Xerox License", + "url": "https://fedoraproject.org/wiki/Licensing/Xerox", + "osiApproved": false + }, + "Xnet": { + "name": "X.Net License", + "url": "https://opensource.org/licenses/Xnet", + "osiApproved": true + }, + "YPL-1.0": { + "name": "Yahoo! Public License v1.0", + "url": "http://www.zimbra.com/license/yahoo_public_license_1.0.html", + "osiApproved": false + }, + "YPL-1.1": { + "name": "Yahoo! Public License v1.1", + "url": "http://www.zimbra.com/license/yahoo_public_license_1.1.html", + "osiApproved": false + }, + "ZPL-1.1": { + "name": "Zope Public License 1.1", + "url": "http://old.zope.org/Resources/License/ZPL-1.1", + "osiApproved": false + }, + "ZPL-2.0": { + "name": "Zope Public License 2.0", + "url": "http://old.zope.org/Resources/License/ZPL-2.0", + "osiApproved": true + }, + "ZPL-2.1": { + "name": "Zope Public License 2.1", + "url": "http://old.zope.org/Resources/ZPL/", + "osiApproved": false + }, + "Zed": { + "name": "Zed License", + "url": "https://fedoraproject.org/wiki/Licensing/Zed", + "osiApproved": false + }, + "Zend-2.0": { + "name": "Zend License v2.0", + "url": "https://web.archive.org/web/20130517195954/http://www.zend.com/license/2_00.txt", + "osiApproved": false + }, + "Zimbra-1.3": { + "name": "Zimbra Public License v1.3", + "url": "http://web.archive.org/web/20100302225219/http://www.zimbra.com/license/zimbra-public-license-1-3.html", + "osiApproved": false + }, + "Zimbra-1.4": { + "name": "Zimbra Public License v1.4", + "url": "http://www.zimbra.com/legal/zimbra-public-license-1-4", + "osiApproved": false + }, + "Zlib": { + "name": "zlib License", + "url": "http://www.zlib.net/zlib_license.html", + "osiApproved": true + }, + "blessing": { + "name": "SQLite Blessing", + "url": "https://www.sqlite.org/src/artifact/e33a4df7e32d742a?ln=4-9", + "osiApproved": false + }, + "bzip2-1.0.5": { + "name": "bzip2 and libbzip2 License v1.0.5", + "url": "http://bzip.org/1.0.5/bzip2-manual-1.0.5.html", + "osiApproved": false + }, + "bzip2-1.0.6": { + "name": "bzip2 and libbzip2 License v1.0.6", + "url": "https://github.com/asimonov-im/bzip2/blob/master/LICENSE", + "osiApproved": false + }, + "copyleft-next-0.3.0": { + "name": "copyleft-next 0.3.0", + "url": "https://github.com/copyleft-next/copyleft-next/blob/master/Releases/copyleft-next-0.3.0", + "osiApproved": false + }, + "copyleft-next-0.3.1": { + "name": "copyleft-next 0.3.1", + "url": "https://github.com/copyleft-next/copyleft-next/blob/master/Releases/copyleft-next-0.3.1", + "osiApproved": false + }, + "curl": { + "name": "curl License", + "url": "https://github.com/bagder/curl/blob/master/COPYING", + "osiApproved": false + }, + "diffmark": { + "name": "diffmark license", + "url": "https://fedoraproject.org/wiki/Licensing/diffmark", + "osiApproved": false + }, + "dvipdfm": { + "name": "dvipdfm License", + "url": "https://fedoraproject.org/wiki/Licensing/dvipdfm", + "osiApproved": false + }, + "eCos-2.0": { + "name": "eCos license version 2.0", + "url": "https://www.gnu.org/licenses/ecos-license.html", + "osiApproved": false + }, + "eGenix": { + "name": "eGenix.com Public License 1.1.0", + "url": "http://www.egenix.com/products/eGenix.com-Public-License-1.1.0.pdf", + "osiApproved": false + }, + "etalab-2.0": { + "name": "Etalab Open License 2.0", + "url": "https://github.com/DISIC/politique-de-contribution-open-source/blob/master/LICENSE.pdf", + "osiApproved": false + }, + "gSOAP-1.3b": { + "name": "gSOAP Public License v1.3b", + "url": "http://www.cs.fsu.edu/~engelen/license.html", + "osiApproved": false + }, + "gnuplot": { + "name": "gnuplot License", + "url": "https://fedoraproject.org/wiki/Licensing/Gnuplot", + "osiApproved": false + }, + "iMatix": { + "name": "iMatix Standard Function Library Agreement", + "url": "http://legacy.imatix.com/html/sfl/sfl4.htm#license", + "osiApproved": false + }, + "libpng-2.0": { + "name": "PNG Reference Library version 2", + "url": "http://www.libpng.org/pub/png/src/libpng-LICENSE.txt", + "osiApproved": false + }, + "libselinux-1.0": { + "name": "libselinux public domain notice", + "url": "https://github.com/SELinuxProject/selinux/blob/master/libselinux/LICENSE", + "osiApproved": false + }, + "libtiff": { + "name": "libtiff License", + "url": "https://fedoraproject.org/wiki/Licensing/libtiff", + "osiApproved": false + }, + "mpich2": { + "name": "mpich2 License", + "url": "https://fedoraproject.org/wiki/Licensing/MIT", + "osiApproved": false + }, + "psfrag": { + "name": "psfrag License", + "url": "https://fedoraproject.org/wiki/Licensing/psfrag", + "osiApproved": false + }, + "psutils": { + "name": "psutils License", + "url": "https://fedoraproject.org/wiki/Licensing/psutils", + "osiApproved": false + }, + "wxWindows": { + "name": "wxWindows Library License", + "url": "https://opensource.org/licenses/WXwindows", + "osiApproved": false + }, + "xinetd": { + "name": "xinetd License", + "url": "https://fedoraproject.org/wiki/Licensing/Xinetd_License", + "osiApproved": false + }, + "xpp": { + "name": "XPP License", + "url": "https://fedoraproject.org/wiki/Licensing/xpp", + "osiApproved": false + }, + "zlib-acknowledgement": { + "name": "zlib/libpng License with Acknowledgement", + "url": "https://fedoraproject.org/wiki/Licensing/ZlibWithAcknowledgement", + "osiApproved": false + } +} \ No newline at end of file diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 25f3bba70a..002c9d637d 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -12,6 +12,7 @@ require "date" require "missing_formula" require "digest" require "cli/parser" +require "json" module Homebrew module_function @@ -109,7 +110,11 @@ module Homebrew # Check style in a single batch run up front for performance style_results = Style.check_style_json(style_files, options) if style_files - + # load licenses + full_path = File.join(File.dirname(__FILE__), "../data/spdx.json") + spdx_ids = File.open(full_path, "r") do |f| + JSON.parse(f.read) + end new_formula_problem_lines = [] audit_formulae.sort.each do |f| only = only_cops ? ["style"] : args.only @@ -120,6 +125,7 @@ module Homebrew git: git, only: only, except: args.except, + spdx_ids: spdx_ids, } options[:style_offenses] = style_results.file_offenses(f.path) if style_results options[:display_cop_names] = args.display_cop_names? @@ -223,6 +229,7 @@ module Homebrew @new_formula_problems = [] @text = FormulaText.new(formula.path) @specs = %w[stable devel head].map { |s| formula.send(s) }.compact + @spdx_ids = options[:spdx_ids] end def audit_style @@ -341,6 +348,40 @@ module Homebrew openssl@1.1 ].freeze + def audit_license + if !formula.license.blank? + if @spdx_ids.key?(formula.license) + return unless @online + + user, repo = get_repo_data(%r{https?://github\.com/([^/]+)/([^/]+)/?.*}, false) + return if user.nil? + + github_license = get_repo_license_data(user, repo) + return if github_license && (github_license == formula.license) + + problem "License mismatch - Github license is: #{github_license}, "\ + "but Formulae license states: #{formula.license}." + else + problem "#{formula.license} is not a standard SPDX license id." + end + else + problem "No license specified for package." + end + end + + def get_repo_license_data(user, repo) + return unless @online + + begin + res = GitHub.open_api("#{GitHub::API_URL}/repos/#{user}/#{repo}/license") + return unless res.key?("license") + + res["license"]["spdx_id"] || nil + rescue GitHub::HTTPNotFoundError + nil + end + end + def audit_deps @specs.each do |spec| # Check for things we don't like to depend on. @@ -545,10 +586,11 @@ module Homebrew new_formula_problem warning end - def get_repo_data(regex) + def get_repo_data(regex, new_formula_only = true) return unless @core_tap return unless @online - return unless @new_formula + + return unless @new_formula || !new_formula_only _, user, repo = *regex.match(formula.stable.url) if formula.stable _, user, repo = *regex.match(formula.homepage) unless user diff --git a/Library/Homebrew/extend/os/linux/resource.rb b/Library/Homebrew/extend/os/linux/resource.rb new file mode 100644 index 0000000000..a5af426c05 --- /dev/null +++ b/Library/Homebrew/extend/os/linux/resource.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class Resource + undef on_linux + + def on_linux(&_block) + yield + end +end diff --git a/Library/Homebrew/extend/os/mac/resource.rb b/Library/Homebrew/extend/os/mac/resource.rb new file mode 100644 index 0000000000..2c53218564 --- /dev/null +++ b/Library/Homebrew/extend/os/mac/resource.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class Resource + undef on_macos + + def on_macos(&_block) + yield + end +end diff --git a/Library/Homebrew/extend/os/resource.rb b/Library/Homebrew/extend/os/resource.rb new file mode 100644 index 0000000000..9ad337890c --- /dev/null +++ b/Library/Homebrew/extend/os/resource.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +if OS.mac? + require "extend/os/mac/resource" +elsif OS.linux? + require "extend/os/linux/resource" +end diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 23017a3995..b401f2f1cc 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -2485,13 +2485,13 @@ class Formula specs.each { |spec| spec.uses_from_macos(dep, bounds) } end - # Block executed only executed on macOS. No-op on Linux. + # Block only executed on macOS. No-op on Linux. #
on_macos do
     #   depends_on "mac_only_dep"
     # end
def on_macos(&_block); end - # Block executed only executed on Linux. No-op on macOS. + # Block only executed on Linux. No-op on macOS. #
on_linux do
     #   depends_on "linux_only_dep"
     # end
diff --git a/Library/Homebrew/resource.rb b/Library/Homebrew/resource.rb index 9053ac8b4d..4b00e4ea3a 100644 --- a/Library/Homebrew/resource.rb +++ b/Library/Homebrew/resource.rb @@ -178,6 +178,18 @@ class Resource patches << p end + # Block only executed on macOS. No-op on Linux. + #
on_macos do
+  #   url "mac_only_url"
+  # end
+ def on_macos(&_block); end + + # Block only executed on Linux. No-op on macOS. + #
on_linux do
+  #   url "linux_only_url"
+  # end
+ def on_linux(&_block); end + protected def mktemp(prefix) @@ -252,3 +264,5 @@ class ResourceStageContext "<#{self.class}: resource=#{resource} staging=#{staging}>" end end + +require "extend/os/resource" diff --git a/Library/Homebrew/test/dev-cmd/audit_spec.rb b/Library/Homebrew/test/dev-cmd/audit_spec.rb index 0a437b20d6..9802f40bd4 100644 --- a/Library/Homebrew/test/dev-cmd/audit_spec.rb +++ b/Library/Homebrew/test/dev-cmd/audit_spec.rb @@ -95,6 +95,84 @@ module Homebrew end end + describe "#audit_license" do + let(:spdx_ids) { + full_path = File.join(File.dirname(__FILE__), "../../data/spdx.json") + File.open(full_path, "r") do |f| + JSON.parse(f.read) + end + } + + let(:custom_spdx_id) { "zzz" } + let(:standard_mismatch_spdx_id) { "0BSD" } + + it "detects no license info" do + fa = formula_auditor "foo", <<~RUBY, spdx_ids: spdx_ids + class Foo < Formula + url "https://brew.sh/foo-1.0.tgz" + license "" + end + RUBY + + fa.audit_license + p fa.problems + expect(fa.problems.first).to match "No license specified for package." + end + + it "detects if license is not a standard spdx-id" do + fa = formula_auditor "foo", <<~RUBY, spdx_ids: spdx_ids + class Foo < Formula + url "https://brew.sh/foo-1.0.tgz" + license "#{custom_spdx_id}" + end + RUBY + + fa.audit_license + expect(fa.problems.first).to match "#{custom_spdx_id} is not a standard SPDX license id." + end + + it "verifies that a license info is a standard spdx id" do + fa = formula_auditor "foo", <<~RUBY, spdx_ids: spdx_ids + class Foo < Formula + url "https://brew.sh/foo-1.0.tgz" + license "0BSD" + end + RUBY + + fa.audit_license + expect(fa.problems).to be_empty + end + + it "checks online and verifies that a standard license id is the same "\ + "as what is indicated on its Github repo" do + fa = formula_auditor "cask", <<~RUBY, spdx_ids: spdx_ids, online: true, core_tap: true + class Cask < Formula + url "https://github.com/cask/cask/archive/v0.8.4.tar.gz" + head "https://github.com/cask/cask.git" + license "GPL-3.0" + end + RUBY + + fa.audit_license + expect(fa.problems).to be_empty + end + + it "checks online and detects that a formula-specified license is not "\ + "the same as what is indicated on its Github repository" do + fa = formula_auditor "cask", <<~RUBY, online: true, spdx_ids: spdx_ids, core_tap: true + class Cask < Formula + url "https://github.com/cask/cask/archive/v0.8.4.tar.gz" + head "https://github.com/cask/cask.git" + license "#{standard_mismatch_spdx_id}" + end + RUBY + + fa.audit_license + expect(fa.problems.first).to match "License mismatch - Github license is: GPL-3.0, "\ + "but Formulae license states: #{standard_mismatch_spdx_id}." + end + end + describe "#audit_file" do specify "DATA but no __END__" do fa = formula_auditor "foo", <<~RUBY diff --git a/Library/Homebrew/test/os/linux/formula_spec.rb b/Library/Homebrew/test/os/linux/formula_spec.rb index cd79ce48ba..159a0838ba 100644 --- a/Library/Homebrew/test/os/linux/formula_spec.rb +++ b/Library/Homebrew/test/os/linux/formula_spec.rb @@ -33,26 +33,6 @@ describe Formula do end end - describe "#on_linux" do - it "defines an url on Linux only" do - f = formula do - homepage "https://brew.sh" - - on_macos do - url "https://brew.sh/test-macos-0.1.tbz" - sha256 TEST_SHA256 - end - - on_linux do - url "https://brew.sh/test-linux-0.1.tbz" - sha256 TEST_SHA256 - end - end - - expect(f.stable.url).to eq("https://brew.sh/test-linux-0.1.tbz") - end - end - describe "#on_linux" do it "adds a dependency on Linux only" do f = formula do @@ -87,27 +67,38 @@ describe Formula do sha256 TEST_SHA256 patch do - url "patch_both" - end - - on_macos do - patch do + on_macos do url "patch_macos" end - end - on_linux do - patch do + on_linux do url "patch_linux" end end end - expect(f.patchlist.length).to eq(2) + expect(f.patchlist.length).to eq(1) expect(f.patchlist.first.strip).to eq(:p1) - expect(f.patchlist.first.url).to eq("patch_both") - expect(f.patchlist.second.strip).to eq(:p1) - expect(f.patchlist.second.url).to eq("patch_linux") + expect(f.patchlist.first.url).to eq("patch_linux") + end + end + + describe "#on_linux" do + it "uses on_linux within a resource block" do + f = formula do + homepage "https://brew.sh" + + url "https://brew.sh/test-0.1.tbz" + sha256 TEST_SHA256 + + resource "test_resource" do + on_linux do + url "on_linux" + end + end + end + expect(f.resources.length).to eq(1) + expect(f.resources.first.url).to eq("on_linux") end end end diff --git a/Library/Homebrew/test/os/mac/formula_spec.rb b/Library/Homebrew/test/os/mac/formula_spec.rb index c966aef3d0..4fb4400c7f 100644 --- a/Library/Homebrew/test/os/mac/formula_spec.rb +++ b/Library/Homebrew/test/os/mac/formula_spec.rb @@ -40,26 +40,6 @@ describe Formula do end end - describe "#on_macos" do - it "defines an url on macos only" do - f = formula do - homepage "https://brew.sh" - - on_macos do - url "https://brew.sh/test-macos-0.1.tbz" - sha256 TEST_SHA256 - end - - on_linux do - url "https://brew.sh/test-linux-0.1.tbz" - sha256 TEST_SHA256 - end - end - - expect(f.stable.url).to eq("https://brew.sh/test-macos-0.1.tbz") - end - end - describe "#on_macos" do it "adds a dependency on macos only" do f = formula do @@ -86,7 +66,7 @@ describe Formula do end describe "#on_macos" do - it "adds a patch on macos only" do + it "adds a patch on Mac only" do f = formula do homepage "https://brew.sh" @@ -94,27 +74,38 @@ describe Formula do sha256 TEST_SHA256 patch do - url "patch_both" - end - - on_macos do - patch do + on_macos do url "patch_macos" end - end - on_linux do - patch do + on_linux do url "patch_linux" end end end - expect(f.patchlist.length).to eq(2) + expect(f.patchlist.length).to eq(1) expect(f.patchlist.first.strip).to eq(:p1) - expect(f.patchlist.first.url).to eq("patch_both") - expect(f.patchlist.second.strip).to eq(:p1) - expect(f.patchlist.second.url).to eq("patch_macos") + expect(f.patchlist.first.url).to eq("patch_macos") + end + end + + describe "#on_macos" do + it "uses on_macos within a resource block" do + f = formula do + homepage "https://brew.sh" + + url "https://brew.sh/test-0.1.tbz" + sha256 TEST_SHA256 + + resource "test_resource" do + on_macos do + url "resource_macos" + end + end + end + expect(f.resources.length).to eq(1) + expect(f.resources.first.url).to eq("resource_macos") end end end diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb index 3c4002ea48..d027866a4d 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -10,7 +10,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/thread_safe-0.3.6/lib $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/tzinfo-1.2.7/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/zeitwerk-2.3.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/activesupport-6.0.3.1/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ast-2.4.0/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ast-2.4.1/lib" $:.unshift "#{path}/" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/universal-darwin-19/2.6.0/byebug-11.1.3" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/byebug-11.1.3/lib" @@ -45,13 +45,13 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/webrobots-0.1.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mechanize-2.7.6/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mustache-1.1.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parallel-1.19.1/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parallel_tests-2.32.0/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parallel_tests-3.0.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parser-2.7.1.3/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/plist-3.5.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rainbow-3.0.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/universal-darwin-19/2.6.0/rdiscount-2.2.0.1" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rdiscount-2.2.0.1/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/regexp_parser-1.7.0/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/regexp_parser-1.7.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rexml-3.2.4/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ronn-0.7.3/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-support-3.9.3/lib" @@ -65,7 +65,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-wait-0.0.9/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-ast-0.0.3/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.10.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-1.7.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-0.85.0/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-0.85.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.6.1/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-1.39.0/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-1.40.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-2.2.0/lib" diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/config/default.yml b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/config/default.yml similarity index 86% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/config/default.yml rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/config/default.yml index 566d5bd56f..bd689553f5 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/config/default.yml +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/config/default.yml @@ -13,31 +13,37 @@ AllCops: RSpec/AlignLeftLetBrace: Description: Checks that left braces for adjacent single line lets are aligned. Enabled: false + VersionAdded: '1.16' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AlignLeftLetBrace RSpec/AlignRightLetBrace: Description: Checks that right braces for adjacent single line lets are aligned. Enabled: false + VersionAdded: '1.16' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AlignRightLetBrace RSpec/AnyInstance: Description: Check that instances are not being stubbed globally. Enabled: true + VersionAdded: '1.4' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AnyInstance RSpec/AroundBlock: Description: Checks that around blocks actually run the test. Enabled: true + VersionAdded: '1.11' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AroundBlock RSpec/Be: Description: Check for expectations where `be` is used without argument. Enabled: true + VersionAdded: '1.25' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Be RSpec/BeEql: Description: Check for expectations where `be(...)` can replace `eql(...)`. Enabled: true + VersionAdded: '1.7' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeEql RSpec/BeforeAfterAll: @@ -47,11 +53,13 @@ RSpec/BeforeAfterAll: - spec/spec_helper.rb - spec/rails_helper.rb - spec/support/**/*.rb + VersionAdded: '1.12' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeforeAfterAll RSpec/ContextMethod: Description: "`context` should not be used for specifying methods." Enabled: true + VersionAdded: '1.36' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextMethod RSpec/ContextWording: @@ -61,86 +69,103 @@ RSpec/ContextWording: - when - with - without + VersionAdded: '1.20' + VersionChanged: 1.20.1 StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextWording RSpec/DescribeClass: Description: Check that the first argument to the top level describe is a constant. Enabled: true + VersionAdded: '1.0' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeClass RSpec/DescribeMethod: Description: Checks that the second argument to `describe` specifies a method. Enabled: true + VersionAdded: '1.0' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeMethod RSpec/DescribeSymbol: Description: Avoid describing symbols. Enabled: true + VersionAdded: '1.15' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeSymbol RSpec/DescribedClass: Description: Checks that tests use `described_class`. - SkipBlocks: false Enabled: true + SkipBlocks: false EnforcedStyle: described_class SupportedStyles: - described_class - explicit + SafeAutoCorrect: false + VersionAdded: '1.0' + VersionChanged: '1.11' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribedClass RSpec/DescribedClassModuleWrapping: Description: Avoid opening modules and defining specs within them. Enabled: false + VersionAdded: '1.37' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribedClassModuleWrapping RSpec/Dialect: Description: This cop enforces custom RSpec dialects. Enabled: false PreferredMethods: {} + VersionAdded: '1.33' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Dialect RSpec/EmptyExampleGroup: Description: Checks if an example group does not include any tests. Enabled: true CustomIncludeMethods: [] + VersionAdded: '1.7' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyExampleGroup RSpec/EmptyHook: Description: Checks for empty before and after hooks. Enabled: true - VersionAdded: 1.39.0 + VersionAdded: '1.39' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyHook RSpec/EmptyLineAfterExample: Description: Checks if there is an empty line after example blocks. Enabled: true AllowConsecutiveOneLiners: true + VersionAdded: '1.36' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterExample RSpec/EmptyLineAfterExampleGroup: Description: Checks if there is an empty line after example group blocks. Enabled: true + VersionAdded: '1.27' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterExampleGroup RSpec/EmptyLineAfterFinalLet: Description: Checks if there is an empty line after the last let block. Enabled: true + VersionAdded: '1.14' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterFinalLet RSpec/EmptyLineAfterHook: Description: Checks if there is an empty line after hook blocks. Enabled: true + VersionAdded: '1.27' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterHook RSpec/EmptyLineAfterSubject: Description: Checks if there is an empty line after subject block. Enabled: true + VersionAdded: '1.14' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterSubject RSpec/ExampleLength: Description: Checks for long examples. Enabled: true Max: 5 + VersionAdded: '1.5' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleLength RSpec/ExampleWithoutDescription: @@ -151,6 +176,7 @@ RSpec/ExampleWithoutDescription: - always_allow - single_line_only - disallow + VersionAdded: '1.22' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWithoutDescription RSpec/ExampleWording: @@ -162,6 +188,8 @@ RSpec/ExampleWording: have: has HAVE: HAS IgnoredWords: [] + VersionAdded: '1.0' + VersionChanged: '1.2' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWording RSpec/ExpectActual: @@ -169,6 +197,7 @@ RSpec/ExpectActual: Enabled: true Exclude: - spec/routing/**/* + VersionAdded: '1.7' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectActual RSpec/ExpectChange: @@ -178,30 +207,37 @@ RSpec/ExpectChange: SupportedStyles: - method_call - block + VersionAdded: '1.22' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectChange RSpec/ExpectInHook: - Enabled: true Description: Do not use `expect` in hooks such as `before`. + Enabled: true + VersionAdded: '1.16' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectInHook RSpec/ExpectOutput: Description: Checks for opportunities to use `expect { ... }.to output`. Enabled: true + VersionAdded: '1.10' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectOutput RSpec/FilePath: - Description: Checks that spec file paths are consistent with the test subject. + Description: Checks that spec file paths are consistent and well-formed. Enabled: true CustomTransform: RuboCop: rubocop RSpec: rspec IgnoreMethods: false + SpecSuffixOnly: false + VersionAdded: '1.2' + VersionChanged: '1.40' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FilePath RSpec/Focus: Description: Checks if examples are focused. Enabled: true + VersionAdded: '1.5' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Focus RSpec/HookArgument: @@ -212,16 +248,19 @@ RSpec/HookArgument: - implicit - each - example + VersionAdded: '1.7' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HookArgument RSpec/HooksBeforeExamples: - Enabled: true Description: Checks for before/around/after hooks that come after an example. + Enabled: true + VersionAdded: '1.29' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HooksBeforeExamples RSpec/ImplicitBlockExpectation: Description: Check that implicit block expectation syntax is not used. Enabled: true + VersionAdded: '1.35' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitBlockExpectation RSpec/ImplicitExpect: @@ -231,32 +270,39 @@ RSpec/ImplicitExpect: SupportedStyles: - is_expected - should + VersionAdded: '1.8' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitExpect RSpec/ImplicitSubject: - Enabled: true Description: Checks for usage of implicit subject (`is_expected` / `should`). + Enabled: true EnforcedStyle: single_line_only SupportedStyles: - single_line_only - single_statement_only - disallow + VersionAdded: '1.29' + VersionChanged: '1.30' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitSubject RSpec/InstanceSpy: Description: Checks for `instance_double` used with `have_received`. Enabled: true + VersionAdded: '1.12' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceSpy RSpec/InstanceVariable: Description: Checks for instance variable usage in specs. - AssignmentOnly: false Enabled: true + AssignmentOnly: false + VersionAdded: '1.0' + VersionChanged: '1.7' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable RSpec/InvalidPredicateMatcher: Description: Checks invalid usage for predicate matcher. Enabled: true + VersionAdded: '1.16' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InvalidPredicateMatcher RSpec/ItBehavesLike: @@ -266,36 +312,45 @@ RSpec/ItBehavesLike: SupportedStyles: - it_behaves_like - it_should_behave_like + VersionAdded: '1.13' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ItBehavesLike RSpec/IteratedExpectation: Description: Check that `all` matcher is used instead of iterating over an array. Enabled: true + VersionAdded: '1.14' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IteratedExpectation RSpec/LeadingSubject: Description: Enforce that subject is the first definition in the test. Enabled: true + VersionAdded: '1.7' + VersionChanged: '1.14' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LeadingSubject RSpec/LeakyConstantDeclaration: Description: Checks that no class, module, or constant is declared. Enabled: true + VersionAdded: '1.35' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LeakyConstantDeclaration RSpec/LetBeforeExamples: Description: Checks for `let` definitions that come after an example. Enabled: true + VersionAdded: '1.16' + VersionChanged: '1.22' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LetBeforeExamples RSpec/LetSetup: Description: Checks unreferenced `let!` calls being used for test setup. Enabled: true + VersionAdded: '1.7' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LetSetup RSpec/MessageChain: Description: Check that chains of messages are not being stubbed. Enabled: true + VersionAdded: '1.7' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageChain RSpec/MessageExpectation: @@ -305,6 +360,8 @@ RSpec/MessageExpectation: SupportedStyles: - allow - expect + VersionAdded: '1.7' + VersionChanged: '1.8' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageExpectation RSpec/MessageSpies: @@ -314,58 +371,70 @@ RSpec/MessageSpies: SupportedStyles: - have_received - receive + VersionAdded: '1.9' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageSpies RSpec/MissingExampleGroupArgument: Description: Checks that the first argument to an example group is not empty. Enabled: true + VersionAdded: '1.28' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MissingExampleGroupArgument RSpec/MultipleDescribes: Description: Checks for multiple top level describes. Enabled: true + VersionAdded: '1.0' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleDescribes RSpec/MultipleExpectations: Description: Checks if examples contain too many `expect` calls. Enabled: true Max: 1 + VersionAdded: '1.7' + VersionChanged: '1.21' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleExpectations RSpec/MultipleSubjects: Description: Checks if an example group defines `subject` multiple times. Enabled: true + VersionAdded: '1.16' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleSubjects RSpec/NamedSubject: Description: Checks for explicitly referenced test subjects. Enabled: true IgnoreSharedExamples: true + VersionAdded: 1.5.3 StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NamedSubject RSpec/NestedGroups: Description: Checks for nested example groups. Enabled: true Max: 3 + VersionAdded: '1.7' + VersionChanged: '1.10' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NestedGroups RSpec/NotToNot: Description: Checks for consistent method usage for negating expectations. + Enabled: true EnforcedStyle: not_to SupportedStyles: - not_to - to_not - Enabled: true + VersionAdded: '1.4' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NotToNot RSpec/OverwritingSetup: - Enabled: true Description: Checks if there is a let/subject that overwrites an existing one. + Enabled: true + VersionAdded: '1.14' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/OverwritingSetup RSpec/Pending: - Enabled: false Description: Checks for any pending or skipped examples. + Enabled: false + VersionAdded: '1.25' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Pending RSpec/PredicateMatcher: @@ -377,109 +446,154 @@ RSpec/PredicateMatcher: SupportedStyles: - inflected - explicit + SafeAutoCorrect: false + VersionAdded: '1.16' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/PredicateMatcher RSpec/ReceiveCounts: - Enabled: true Description: Check for `once` and `twice` receive counts matchers usage. + Enabled: true + VersionAdded: '1.26' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveCounts RSpec/ReceiveNever: - Enabled: true Description: Prefer `not_to receive(...)` over `receive(...).never`. + Enabled: true + VersionAdded: '1.28' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveNever RSpec/RepeatedDescription: - Enabled: true Description: Check for repeated description strings in example groups. + Enabled: true + VersionAdded: '1.9' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedDescription RSpec/RepeatedExample: - Enabled: true Description: Check for repeated examples within example groups. + Enabled: true + VersionAdded: '1.10' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedExample RSpec/RepeatedExampleGroupBody: - Enabled: true Description: Check for repeated describe and context block body. + Enabled: true + VersionAdded: '1.38' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedExampleGroupBody RSpec/RepeatedExampleGroupDescription: - Enabled: true Description: Check for repeated example group descriptions. + Enabled: true + VersionAdded: '1.38' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedExampleGroupDescription RSpec/ReturnFromStub: - Enabled: true Description: Checks for consistent style of stub's return setting. + Enabled: true EnforcedStyle: and_return SupportedStyles: - and_return - block + VersionAdded: '1.16' + VersionChanged: '1.22' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReturnFromStub RSpec/ScatteredLet: Description: Checks for let scattered across the example group. Enabled: true - StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredLet + VersionAdded: '1.14' VersionChanged: '1.39' + StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredLet RSpec/ScatteredSetup: Description: Checks for setup scattered across multiple hooks in an example group. Enabled: true + VersionAdded: '1.10' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredSetup RSpec/SharedContext: Description: Checks for proper shared_context and shared_examples usage. Enabled: true + VersionAdded: '1.13' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SharedContext RSpec/SharedExamples: Description: Enforces use of string to titleize shared examples. Enabled: true + VersionAdded: '1.25' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SharedExamples RSpec/SingleArgumentMessageChain: Description: Checks that chains of messages contain more than one element. Enabled: true + VersionAdded: '1.9' + VersionChanged: '1.10' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SingleArgumentMessageChain RSpec/SubjectStub: Description: Checks for stubbed test subjects. Enabled: true + VersionAdded: '1.7' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SubjectStub RSpec/UnspecifiedException: Description: Checks for a specified error in checking raised errors. Enabled: true + VersionAdded: '1.30' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/UnspecifiedException +RSpec/VariableDefinition: + Description: Checks that memoized helpers names are symbols or strings. + Enabled: true + EnforcedStyle: symbols + SupportedStyles: + - symbols + - strings + VersionAdded: '1.40' + StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VariableDefinition + +RSpec/VariableName: + Description: Checks that memoized helper names use the configured style. + Enabled: true + EnforcedStyle: snake_case + SupportedStyles: + - snake_case + - camelCase + VersionAdded: '1.40' + StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VariableName + RSpec/VerifiedDoubles: Description: Prefer using verifying doubles over normal doubles. Enabled: true IgnoreNameless: true IgnoreSymbolicNames: false + VersionAdded: 1.2.1 + VersionChanged: '1.5' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VerifiedDoubles RSpec/VoidExpect: Description: This cop checks void `expect()`. Enabled: true + VersionAdded: '1.16' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VoidExpect RSpec/Yield: Description: This cop checks for calling a block within a stub. Enabled: true + VersionAdded: '1.32' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Yield Capybara/CurrentPathExpectation: Description: Checks that no expectations are set on Capybara's `current_path`. Enabled: true + VersionAdded: '1.18' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/CurrentPathExpectation Capybara/FeatureMethods: Description: Checks for consistent method usage in feature specs. Enabled: true EnabledMethods: [] + VersionAdded: '1.17' + VersionChanged: '1.25' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/FeatureMethods Capybara/VisibilityMatcher: @@ -491,6 +605,7 @@ Capybara/VisibilityMatcher: FactoryBot/AttributeDefinedStatically: Description: Always declare attribute values as blocks. Enabled: true + VersionAdded: '1.28' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/AttributeDefinedStatically FactoryBot/CreateList: @@ -500,11 +615,13 @@ FactoryBot/CreateList: SupportedStyles: - create_list - n_times + VersionAdded: '1.25' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/CreateList FactoryBot/FactoryClassName: Description: Use string value when setting the class attribute explicitly. Enabled: true + VersionAdded: '1.37' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/FactoryClassName Rails/HttpStatus: @@ -514,4 +631,5 @@ Rails/HttpStatus: SupportedStyles: - numeric - symbolic + VersionAdded: '1.23' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/HttpStatus diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop-rspec.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop-rspec.rb similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop-rspec.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop-rspec.rb index 9aa56c6f28..cf9231dd8f 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop-rspec.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop-rspec.rb @@ -17,6 +17,7 @@ require_relative 'rubocop/rspec/concept' require_relative 'rubocop/rspec/example_group' require_relative 'rubocop/rspec/example' require_relative 'rubocop/rspec/hook' +require_relative 'rubocop/rspec/variable' require_relative 'rubocop/cop/rspec/cop' require_relative 'rubocop/rspec/align_let_brace' require_relative 'rubocop/rspec/factory_bot' diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/align_left_let_brace.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/align_left_let_brace.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/align_left_let_brace.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/align_left_let_brace.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/align_right_let_brace.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/align_right_let_brace.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/align_right_let_brace.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/align_right_let_brace.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/any_instance.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/any_instance.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/any_instance.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/any_instance.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/around_block.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/around_block.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/around_block.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/around_block.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/be.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/be.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/be.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/be.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/be_eql.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/be_eql.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/be_eql.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/be_eql.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/before_after_all.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/before_after_all.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/before_after_all.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/before_after_all.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/capybara/feature_methods.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/capybara/feature_methods.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/capybara/feature_methods.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/capybara/feature_methods.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/capybara/visibility_matcher.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/capybara/visibility_matcher.rb similarity index 61% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/capybara/visibility_matcher.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/capybara/visibility_matcher.rb index 35f4579e12..4e23c12c9c 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/capybara/visibility_matcher.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/capybara/visibility_matcher.rb @@ -18,35 +18,50 @@ module RuboCop # # # bad # expect(page).to have_selector('.foo', visible: false) - # - # # bad - # expect(page).to have_selector('.foo', visible: true) - # - # # good - # expect(page).to have_selector('.foo', visible: :all) - # - # # good - # expect(page).to have_selector('.foo', visible: :hidden) + # expect(page).to have_css('.foo', visible: true) + # expect(page).to have_link('my link', visible: false) # # # good # expect(page).to have_selector('.foo', visible: :visible) + # expect(page).to have_css('.foo', visible: :all) + # expect(page).to have_link('my link', visible: :hidden) # class VisibilityMatcher < Cop MSG_FALSE = 'Use `:all` or `:hidden` instead of `false`.' MSG_TRUE = 'Use `:visible` instead of `true`.' + CAPYBARA_MATCHER_METHODS = %i[ + have_selector + have_css + have_xpath + have_link + have_button + have_field + have_select + have_table + have_checked_field + have_unchecked_field + have_text + have_content + ].freeze def_node_matcher :visible_true?, <<~PATTERN - (send nil? :have_selector ... (hash <$(pair (sym :visible) true) ...>)) + (send nil? #capybara_matcher? ... (hash <$(pair (sym :visible) true) ...>)) PATTERN def_node_matcher :visible_false?, <<~PATTERN - (send nil? :have_selector ... (hash <$(pair (sym :visible) false) ...>)) + (send nil? #capybara_matcher? ... (hash <$(pair (sym :visible) false) ...>)) PATTERN def on_send(node) visible_false?(node) { |arg| add_offense(arg, message: MSG_FALSE) } visible_true?(node) { |arg| add_offense(arg, message: MSG_TRUE) } end + + private + + def capybara_matcher?(method_name) + CAPYBARA_MATCHER_METHODS.include? method_name + end end end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/context_method.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/context_method.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/context_method.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/context_method.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/context_wording.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/context_wording.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/context_wording.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/context_wording.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/cop.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/cop.rb similarity index 68% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/cop.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/cop.rb index fa8e304279..1c8cf00861 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/cop.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/cop.rb @@ -2,28 +2,8 @@ module RuboCop module Cop - WorkaroundCop = Cop.dup - - # Clone of the the normal RuboCop::Cop::Cop class so we can rewrite - # the inherited method without breaking functionality - class WorkaroundCop - # Remove the Cop.inherited method to be a noop. Our RSpec::Cop - # class will invoke the inherited hook instead - class << self - undef inherited - def inherited(*) end - end - - # Special case `Module#<` so that the rspec support rubocop exports - # is compatible with our subclass - def self.<(other) - other.equal?(RuboCop::Cop::Cop) || super - end - end - private_constant(:WorkaroundCop) - module RSpec - # @abstract parent class to rspec cops + # @abstract parent class to RSpec cops # # The criteria for whether rubocop-rspec analyzes a certain ruby file # is configured via `AllCops/RSpec`. For example, if you want to @@ -31,13 +11,13 @@ module RuboCop # then you could add this to your configuration: # # @example configuring analyzed paths - # - # AllCops: - # RSpec: - # Patterns: - # - '_test.rb$' - # - '(?:^|/)test/' - class Cop < WorkaroundCop + # # .rubocop.yml + # # AllCops: + # # RSpec: + # # Patterns: + # # - '_test.rb$' + # # - '(?:^|/)test/' + class Cop < ::RuboCop::Cop::Cop include RuboCop::RSpec::Language include RuboCop::RSpec::Language::NodePattern diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/describe_class.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/describe_class.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/describe_class.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/describe_class.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/describe_method.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/describe_method.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/describe_method.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/describe_method.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/describe_symbol.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/describe_symbol.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/describe_symbol.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/describe_symbol.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/described_class.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/described_class.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/described_class.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/described_class.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/described_class_module_wrapping.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/described_class_module_wrapping.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/described_class_module_wrapping.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/described_class_module_wrapping.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/dialect.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/dialect.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/dialect.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/dialect.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/empty_example_group.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/empty_example_group.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/empty_example_group.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/empty_example_group.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/empty_hook.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/empty_hook.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/empty_hook.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/empty_hook.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/empty_line_after_example.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/empty_line_after_example.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/empty_line_after_example.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/empty_line_after_example.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/empty_line_after_example_group.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/empty_line_after_example_group.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/empty_line_after_example_group.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/empty_line_after_example_group.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/empty_line_after_final_let.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/empty_line_after_final_let.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/empty_line_after_final_let.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/empty_line_after_final_let.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/empty_line_after_hook.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/empty_line_after_hook.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/empty_line_after_hook.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/empty_line_after_hook.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/empty_line_after_subject.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/empty_line_after_subject.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/empty_line_after_subject.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/empty_line_after_subject.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/example_length.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/example_length.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/example_length.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/example_length.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/example_without_description.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/example_without_description.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/example_without_description.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/example_without_description.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/example_wording.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/example_wording.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/example_wording.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/example_wording.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/expect_actual.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/expect_actual.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/expect_actual.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/expect_actual.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/expect_change.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/expect_change.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/expect_change.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/expect_change.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/expect_in_hook.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/expect_in_hook.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/expect_in_hook.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/expect_in_hook.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/expect_output.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/expect_output.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/expect_output.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/expect_output.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/factory_bot/create_list.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/factory_bot/create_list.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/factory_bot/create_list.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/factory_bot/create_list.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/file_path.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/file_path.rb similarity index 74% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/file_path.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/file_path.rb index e368424ef9..4407c871be 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/file_path.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/file_path.rb @@ -3,10 +3,11 @@ module RuboCop module Cop module RSpec - # Checks that spec file paths are consistent with the test subject. + # Checks that spec file paths are consistent and well-formed. # - # Checks the path of the spec file and enforces that it reflects the - # described class/module and its optionally called out method. + # By default, this checks that spec file paths are consistent with the + # test subject and and enforces that it reflects the described + # class/module and its optionally called out method. # # With the configuration option `IgnoreMethods` the called out method will # be ignored when determining the enforced path. @@ -15,6 +16,10 @@ module RuboCop # be specified that should not as usual be transformed from CamelCase to # snake_case (e.g. 'RuboCop' => 'rubocop' ). # + # With the configuration option `SpecSuffixOnly` test files will only + # be checked to ensure they end in '_spec.rb'. This option disables + # checking for consistency in the test subject or test methods. + # # @example # # bad # whatever_spec.rb # describe MyClass @@ -41,6 +46,16 @@ module RuboCop # # good # my_class_spec.rb # describe MyClass, '#method' # + # @example when configuration is `SpecSuffixOnly: true` + # # good + # whatever_spec.rb # describe MyClass + # + # # good + # my_class_spec.rb # describe MyClass + # + # # good + # my_class_spec.rb # describe MyClass, '#method' + # class FilePath < Cop include RuboCop::RSpec::TopLevelDescribe @@ -70,9 +85,15 @@ module RuboCop end def glob_for((described_class, method_name)) + return glob_for_spec_suffix_only? if spec_suffix_only? + "#{expected_path(described_class)}#{name_glob(method_name)}*_spec.rb" end + def glob_for_spec_suffix_only? + '*_spec.rb' + end + def name_glob(name) return unless name&.str_type? @@ -105,12 +126,17 @@ module RuboCop def filename_ends_with?(glob) filename = RuboCop::PathUtil.relative_path(processed_source.buffer.name) + .gsub('../', '') File.fnmatch?("*#{glob}", filename) end def relevant_rubocop_rspec_file?(_file) true end + + def spec_suffix_only? + cop_config['SpecSuffixOnly'] + end end end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/focus.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/focus.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/focus.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/focus.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/hook_argument.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/hook_argument.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/hook_argument.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/hook_argument.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/hooks_before_examples.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/hooks_before_examples.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/hooks_before_examples.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/hooks_before_examples.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/implicit_block_expectation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/implicit_block_expectation.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/implicit_block_expectation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/implicit_block_expectation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/implicit_expect.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/implicit_expect.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/implicit_expect.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/implicit_expect.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/implicit_subject.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/implicit_subject.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/implicit_subject.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/implicit_subject.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/instance_spy.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/instance_spy.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/instance_spy.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/instance_spy.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/instance_variable.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/instance_variable.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/instance_variable.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/instance_variable.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/invalid_predicate_matcher.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/invalid_predicate_matcher.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/invalid_predicate_matcher.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/invalid_predicate_matcher.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/it_behaves_like.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/it_behaves_like.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/it_behaves_like.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/it_behaves_like.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/iterated_expectation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/iterated_expectation.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/iterated_expectation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/iterated_expectation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/leading_subject.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/leading_subject.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/leading_subject.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/leading_subject.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/leaky_constant_declaration.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/leaky_constant_declaration.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/leaky_constant_declaration.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/leaky_constant_declaration.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/let_before_examples.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/let_before_examples.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/let_before_examples.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/let_before_examples.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/let_setup.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/let_setup.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/let_setup.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/let_setup.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/message_chain.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/message_chain.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/message_chain.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/message_chain.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/message_expectation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/message_expectation.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/message_expectation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/message_expectation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/message_spies.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/message_spies.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/message_spies.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/message_spies.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/missing_example_group_argument.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/missing_example_group_argument.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/missing_example_group_argument.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/missing_example_group_argument.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/multiple_describes.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/multiple_describes.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/multiple_describes.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/multiple_describes.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/multiple_expectations.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/multiple_expectations.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/multiple_expectations.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/multiple_expectations.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/multiple_subjects.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/multiple_subjects.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/multiple_subjects.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/multiple_subjects.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/named_subject.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/named_subject.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/named_subject.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/named_subject.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/nested_groups.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/nested_groups.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/nested_groups.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/nested_groups.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/not_to_not.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/not_to_not.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/not_to_not.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/not_to_not.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/overwriting_setup.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/overwriting_setup.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/overwriting_setup.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/overwriting_setup.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/pending.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/pending.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/pending.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/pending.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/predicate_matcher.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/predicate_matcher.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/predicate_matcher.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/predicate_matcher.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/rails/http_status.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/rails/http_status.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/rails/http_status.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/rails/http_status.rb index fae03385ca..32a4dbd1e3 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/rails/http_status.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/rails/http_status.rb @@ -70,6 +70,7 @@ module RuboCop 'to describe HTTP status code.' attr_reader :node + def initialize(node) @node = node end @@ -110,6 +111,7 @@ module RuboCop ALLOWED_STATUSES = %i[error success missing redirect].freeze attr_reader :node + def initialize(node) @node = node end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/receive_counts.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/receive_counts.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/receive_counts.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/receive_counts.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/receive_never.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/receive_never.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/receive_never.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/receive_never.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/repeated_description.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/repeated_description.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/repeated_description.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/repeated_description.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/repeated_example.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/repeated_example.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/repeated_example.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/repeated_example.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/repeated_example_group_body.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/repeated_example_group_body.rb similarity index 86% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/repeated_example_group_body.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/repeated_example_group_body.rb index ab55a509fa..0670df5545 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/repeated_example_group_body.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/repeated_example_group_body.rb @@ -34,6 +34,15 @@ module RuboCop # it { cool_predicate } # end # + # # good + # context Array do + # it { is_expected.to respond_to :each } + # end + # + # context Hash do + # it { is_expected.to respond_to :each } + # end + # class RepeatedExampleGroupBody < Cop MSG = 'Repeated %s block body on line(s) %s' @@ -43,6 +52,7 @@ module RuboCop def_node_matcher :metadata, '(block (send _ _ _ $...) ...)' def_node_matcher :body, '(block _ args $...)' + def_node_matcher :const_arg, '(block (send _ _ $const ...) ...)' def_node_matcher :skip_or_pending?, <<-PATTERN (block <(send nil? {:skip :pending}) ...>) @@ -75,7 +85,7 @@ module RuboCop end def signature_keys(group) - [metadata(group), body(group)] + [metadata(group), body(group), const_arg(group)] end def message(group, repeats) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/repeated_example_group_description.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/repeated_example_group_description.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/repeated_example_group_description.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/repeated_example_group_description.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/return_from_stub.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/return_from_stub.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/return_from_stub.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/return_from_stub.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/scattered_let.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/scattered_let.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/scattered_let.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/scattered_let.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/scattered_setup.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/scattered_setup.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/scattered_setup.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/scattered_setup.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/shared_context.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/shared_context.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/shared_context.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/shared_context.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/shared_examples.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/shared_examples.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/shared_examples.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/shared_examples.rb index 5395d1b849..522168a6f8 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/shared_examples.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/shared_examples.rb @@ -47,6 +47,7 @@ module RuboCop 'to titleize shared examples.' attr_reader :node + def initialize(node) @node = node end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/single_argument_message_chain.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/single_argument_message_chain.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/single_argument_message_chain.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/single_argument_message_chain.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/subject_stub.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/subject_stub.rb similarity index 57% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/subject_stub.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/subject_stub.rb index 7454a32a68..9c8b3f3921 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/subject_stub.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/subject_stub.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require 'set' + module RuboCop module Cop module RSpec @@ -75,70 +77,46 @@ module RuboCop def on_block(node) return unless example_group?(node) + return if (processed_example_groups & node.ancestors).any? - find_subject_stub(node) do |stub| + processed_example_groups << node + @explicit_subjects = find_all_explicit_subjects(node) + + find_subject_expectations(node) do |stub| add_offense(stub) end end private - # Find subjects within tree and then find (send) nodes for that subject - # - # @param node [RuboCop::Node] example group - # - # @yield [RuboCop::Node] message expectations for subject - def find_subject_stub(node, &block) - find_subject(node) do |subject_name, context| - find_subject_expectation(context, subject_name, &block) + def processed_example_groups + @processed_example_groups ||= Set.new + end + + def find_all_explicit_subjects(node) + node.each_descendant(:block).with_object({}) do |child, h| + name = subject(child) + next unless name + + outer_example_group = child.each_ancestor.find do |a| + example_group?(a) + end + + h[outer_example_group] ||= [] + h[outer_example_group] << name end end - # Find a subject message expectation - # - # @param node [RuboCop::Node] - # @param subject_name [Symbol] name of subject - # - # @yield [RuboCop::Node] message expectation - def find_subject_expectation(node, subject_name, &block) - # Do not search node if it is an example group with its own subject. - return if example_group?(node) && redefines_subject?(node) + def find_subject_expectations(node, subject_names = [], &block) + subject_names = @explicit_subjects[node] if @explicit_subjects[node] - # Yield the current node if it is a message expectation. - yield(node) if message_expectation?(node, subject_name) - - # Recurse through node's children looking for a message expectation. - node.each_child_node do |child| - find_subject_expectation(child, subject_name, &block) + expectation_detected = (subject_names + [:subject]).any? do |name| + message_expectation?(node, name) end - end - - # Check if node's children contain a subject definition - # - # @param node [RuboCop::Node] - # - # @return [Boolean] - def redefines_subject?(node) - node.each_child_node.any? do |child| - subject(child) || redefines_subject?(child) - end - end - - # Find a subject definition - # - # @param node [RuboCop::Node] - # @param parent [RuboCop::Node,nil] - # - # @yieldparam subject_name [Symbol] name of subject being defined - # @yieldparam parent [RuboCop::Node] parent of subject definition - def find_subject(node, parent: nil, &block) - # An implicit subject is defined by RSpec when no subject is declared - subject_name = subject(node) || :subject - - yield(subject_name, parent) if parent + return yield(node) if expectation_detected node.each_child_node do |child| - find_subject(child, parent: node, &block) + find_subject_expectations(child, subject_names, &block) end end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/unspecified_exception.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/unspecified_exception.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib/rubocop/cop/rspec/unspecified_exception.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/unspecified_exception.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/variable_definition.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/variable_definition.rb new file mode 100644 index 0000000000..5981d07e4f --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib/rubocop/cop/rspec/variable_definition.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +module RuboCop + module Cop + module RSpec + # Checks that memoized helpers names are symbols or strings. + # + # @example EnforcedStyle: symbols (default) + # # bad + # let('user_name') { 'Adam' } + # subject('user') { create_user } + # + # # good + # let(:user_name) { 'Adam' } + # subject(:user) { create_user } + # + # @example EnforcedStyle: strings + # # bad + # let(:user_name) { 'Adam' } + # subject(:user) { create_user } + # + # # good + # let('user_name') { 'Adam' } + # subject('user') { create_user } + class VariableDefinition < Cop + include ConfigurableEnforcedStyle + include RuboCop::RSpec::Variable + + MSG = 'Use %