diff --git a/Library/Homebrew/test/cask/cask_loader/from_uri_loader_spec.rb b/Library/Homebrew/test/cask/cask_loader/from_uri_loader_spec.rb index 8ef1b0a9c8..a1522bdfcc 100644 --- a/Library/Homebrew/test/cask/cask_loader/from_uri_loader_spec.rb +++ b/Library/Homebrew/test/cask/cask_loader/from_uri_loader_spec.rb @@ -3,17 +3,17 @@ describe Hbc::CaskLoader::FromURILoader do describe "::can_load?" do it "returns true when given an URI" do - expect(described_class).to be_able_to_load(URI("http://example.com/")) + expect(described_class).to be_able_to_load(URI("https://example.com/")) end it "returns true when given a String which can be parsed to a URI" do - expect(described_class).to be_able_to_load("http://example.com/") + expect(described_class).to be_able_to_load("https://example.com/") end it "returns false when given a String with Cask contents containing a URL" do expect(described_class).not_to be_able_to_load <<~RUBY cask 'token' do - url 'http://example.com/' + url 'https://example.com/' end RUBY end diff --git a/Library/Homebrew/test/rubocops/caveats_cop_spec.rb b/Library/Homebrew/test/rubocops/caveats_cop_spec.rb index 9c92d8fb81..3ab4efd14b 100644 --- a/Library/Homebrew/test/rubocops/caveats_cop_spec.rb +++ b/Library/Homebrew/test/rubocops/caveats_cop_spec.rb @@ -7,8 +7,8 @@ describe RuboCop::Cop::FormulaAudit::Caveats do it "When there is setuid mentioned in caveats" do expect_offense(<<~RUBY) class Foo < Formula - homepage "http://example.com/foo" - url "http://example.com/foo-1.0.tgz" + homepage "https://example.com/foo" + url "https://example.com/foo-1.0.tgz" def caveats "setuid" ^^^^^^ Don\'t recommend setuid in the caveats, suggest sudo instead. diff --git a/Library/Homebrew/test/rubocops/checksum_cop_spec.rb b/Library/Homebrew/test/rubocops/checksum_cop_spec.rb index f1c6acfc96..edc3015844 100644 --- a/Library/Homebrew/test/rubocops/checksum_cop_spec.rb +++ b/Library/Homebrew/test/rubocops/checksum_cop_spec.rb @@ -7,7 +7,7 @@ describe RuboCop::Cop::FormulaAudit::Checksum do it "When the checksum is empty" do expect_offense(<<~RUBY) class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' stable do url "https://github.com/foo-lang/foo-compiler/archive/0.18.0.tar.gz" sha256 "" @@ -26,7 +26,7 @@ describe RuboCop::Cop::FormulaAudit::Checksum do it "When the checksum is not 64 characters" do expect_offense(<<~RUBY) class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' stable do url "https://github.com/foo-lang/foo-compiler/archive/0.18.0.tar.gz" sha256 "5cf6e1ae0a645b426c0474cc7cd3f7d1605ffa1ac5756a39a8b2268ddc7ea0e9ad" @@ -45,7 +45,7 @@ describe RuboCop::Cop::FormulaAudit::Checksum do it "When the checksum has invalid chars" do expect_offense(<<~RUBY) class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' stable do url "https://github.com/foo-lang/foo-compiler/archive/0.18.0.tar.gz" sha256 "5cf6e1ae0a645b426c0k7cc7cd3f7d1605ffa1ac5756a39a8b2268ddc7ea0e9a" @@ -70,7 +70,7 @@ describe RuboCop::Cop::FormulaAudit::ChecksumCase do it "When the checksum has upper case characters" do expect_offense(<<~RUBY) class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' stable do url "https://github.com/foo-lang/foo-compiler/archive/0.18.0.tar.gz" sha256 "5cf6e1ae0A645b426c0a7cc7cd3f7d1605ffa1ac5756a39a8b2268ddc7ea0e9a" @@ -89,7 +89,7 @@ describe RuboCop::Cop::FormulaAudit::ChecksumCase do it "When auditing stable blocks outside spec blocks" do expect_offense(<<~RUBY) class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' resource "foo-outside" do url "https://github.com/foo-lang/foo-outside/archive/0.18.0.tar.gz" sha256 "A4cc7cd3f7d1605ffa1ac5755cf6e1ae0a645b426b047a6a39a8b2268ddc7ea9" @@ -113,7 +113,7 @@ describe RuboCop::Cop::FormulaAudit::ChecksumCase do it "When there is uppercase sha256" do source = <<~RUBY class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' stable do url "https://github.com/foo-lang/foo-compiler/archive/0.18.0.tar.gz" sha256 "5cf6e1ae0A645b426c0a7cc7cd3f7d1605ffa1ac5756a39a8b2268ddc7ea0e9a" @@ -128,7 +128,7 @@ describe RuboCop::Cop::FormulaAudit::ChecksumCase do corrected_source = <<~RUBY class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' stable do url "https://github.com/foo-lang/foo-compiler/archive/0.18.0.tar.gz" sha256 "5cf6e1ae0a645b426c0a7cc7cd3f7d1605ffa1ac5756a39a8b2268ddc7ea0e9a" diff --git a/Library/Homebrew/test/rubocops/class_cop_spec.rb b/Library/Homebrew/test/rubocops/class_cop_spec.rb index 71abbda210..0c4358d368 100644 --- a/Library/Homebrew/test/rubocops/class_cop_spec.rb +++ b/Library/Homebrew/test/rubocops/class_cop_spec.rb @@ -7,7 +7,7 @@ describe RuboCop::Cop::FormulaAudit::ClassName do expect_offense(<<~RUBY) class Foo < ScriptFileFormula ^^^^^^^^^^^^^^^^^ ScriptFileFormula is deprecated, use Formula instead - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' end RUBY end @@ -16,7 +16,7 @@ describe RuboCop::Cop::FormulaAudit::ClassName do expect_offense(<<~RUBY) class Foo < GithubGistFormula ^^^^^^^^^^^^^^^^^ GithubGistFormula is deprecated, use Formula instead - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' end RUBY end @@ -25,7 +25,7 @@ describe RuboCop::Cop::FormulaAudit::ClassName do expect_offense(<<~RUBY) class Foo < AmazonWebServicesFormula ^^^^^^^^^^^^^^^^^^^^^^^^ AmazonWebServicesFormula is deprecated, use Formula instead - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' end RUBY end @@ -33,13 +33,13 @@ describe RuboCop::Cop::FormulaAudit::ClassName do it "supports auto-correcting deprecated parent classes" do source = <<~RUBY class Foo < AmazonWebServicesFormula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' end RUBY corrected_source = <<~RUBY class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' end RUBY @@ -55,7 +55,7 @@ describe RuboCop::Cop::FormulaAuditStrict::Test do expect_offense(<<~RUBY) class Foo < Formula ^^^^^^^^^^^^^^^^^^^ A `test do` test block should be added - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' end RUBY end diff --git a/Library/Homebrew/test/rubocops/components_order_cop_spec.rb b/Library/Homebrew/test/rubocops/components_order_cop_spec.rb index cd37ddca1c..cc69b696eb 100644 --- a/Library/Homebrew/test/rubocops/components_order_cop_spec.rb +++ b/Library/Homebrew/test/rubocops/components_order_cop_spec.rb @@ -7,9 +7,9 @@ describe RuboCop::Cop::FormulaAudit::ComponentsOrder do it "When url precedes homepage" do expect_offense(<<~RUBY) class Foo < Formula - url "http://example.com/foo-1.0.tgz" - homepage "http://example.com" - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `homepage` (line 3) should be put before `url` (line 2) + url "https://example.com/foo-1.0.tgz" + homepage "https://example.com" + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `homepage` (line 3) should be put before `url` (line 2) end RUBY end @@ -64,15 +64,15 @@ describe RuboCop::Cop::FormulaAudit::ComponentsOrder do it "When url precedes homepage" do source = <<~RUBY class Foo < Formula - url "http://example.com/foo-1.0.tgz" - homepage "http://example.com" + url "https://example.com/foo-1.0.tgz" + homepage "https://example.com" end RUBY correct_source = <<~RUBY class Foo < Formula - homepage "http://example.com" - url "http://example.com/foo-1.0.tgz" + homepage "https://example.com" + url "https://example.com/foo-1.0.tgz" end RUBY diff --git a/Library/Homebrew/test/rubocops/components_redundancy_cop_spec.rb b/Library/Homebrew/test/rubocops/components_redundancy_cop_spec.rb index 08ab0210a6..f363ca3853 100644 --- a/Library/Homebrew/test/rubocops/components_redundancy_cop_spec.rb +++ b/Library/Homebrew/test/rubocops/components_redundancy_cop_spec.rb @@ -7,8 +7,8 @@ describe RuboCop::Cop::FormulaAudit::ComponentsRedundancy do it "When url outside stable block" do expect_offense(<<~RUBY) class Foo < Formula - url "http://example.com/foo-1.0.tgz" - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `url` should be put inside `stable` block + url "https://example.com/foo-1.0.tgz" + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `url` should be put inside `stable` block stable do # stuff end @@ -23,7 +23,7 @@ describe RuboCop::Cop::FormulaAudit::ComponentsRedundancy do it "When both `head` and `head do` are present" do expect_offense(<<~RUBY) class Foo < Formula - head "http://example.com/foo.git" + head "https://example.com/foo.git" head do ^^^^^^^ `head` and `head do` should not be simultaneously present # stuff @@ -35,7 +35,7 @@ describe RuboCop::Cop::FormulaAudit::ComponentsRedundancy do it "When both `bottle :modifier` and `bottle do` are present" do expect_offense(<<~RUBY) class Foo < Formula - url "http://example.com/foo-1.0.tgz" + url "https://example.com/foo-1.0.tgz" bottle do ^^^^^^^^^ `bottle :modifier` and `bottle do` should not be simultaneously present # bottles go here @@ -48,7 +48,7 @@ describe RuboCop::Cop::FormulaAudit::ComponentsRedundancy do it "When `stable do` is present with a `head` method" do expect_no_offenses(<<~RUBY) class Foo < Formula - head "http://example.com/foo.git" + head "https://example.com/foo.git" stable do # stuff diff --git a/Library/Homebrew/test/rubocops/conflicts_cop_spec.rb b/Library/Homebrew/test/rubocops/conflicts_cop_spec.rb index 5f6f020fd2..788d9f6fc9 100644 --- a/Library/Homebrew/test/rubocops/conflicts_cop_spec.rb +++ b/Library/Homebrew/test/rubocops/conflicts_cop_spec.rb @@ -7,7 +7,7 @@ describe RuboCop::Cop::FormulaAudit::Conflicts do it "multiple conflicts_with" do expect_offense(<<~RUBY, "/homebrew-core/Formula/foo@2.0.rb") class FooAT20 < Formula - url 'http://example.com/foo-2.0.tgz' + url 'https://example.com/foo-2.0.tgz' conflicts_with "mysql", "mariadb", "percona-server", ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Versioned formulae should not use `conflicts_with`. Use `keg_only :versioned_formula` instead. :because => "both install plugins" @@ -18,7 +18,7 @@ describe RuboCop::Cop::FormulaAudit::Conflicts do it "no conflicts_with" do expect_no_offenses(<<~RUBY, "/homebrew-core/Formula/foo@2.0.rb") class FooAT20 < Formula - url 'http://example.com/foo-2.0.tgz' + url 'https://example.com/foo-2.0.tgz' desc 'Bar' end RUBY diff --git a/Library/Homebrew/test/rubocops/dependency_order_cop_spec.rb b/Library/Homebrew/test/rubocops/dependency_order_cop_spec.rb index eccdab411d..38af72d231 100644 --- a/Library/Homebrew/test/rubocops/dependency_order_cop_spec.rb +++ b/Library/Homebrew/test/rubocops/dependency_order_cop_spec.rb @@ -7,8 +7,8 @@ describe RuboCop::Cop::NewFormulaAudit::DependencyOrder do it "wrong conditional depends_on order" do expect_offense(<<~RUBY) class Foo < Formula - homepage "http://example.com" - url "http://example.com/foo-1.0.tgz" + homepage "https://example.com" + url "https://example.com/foo-1.0.tgz" depends_on "apple" if build.with? "foo" depends_on "foo" => :optional ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dependency "foo" (line 5) should be put before dependency "apple" (line 4) @@ -19,8 +19,8 @@ describe RuboCop::Cop::NewFormulaAudit::DependencyOrder do it "wrong alphabetical depends_on order" do expect_offense(<<~RUBY) class Foo < Formula - homepage "http://example.com" - url "http://example.com/foo-1.0.tgz" + homepage "https://example.com" + url "https://example.com/foo-1.0.tgz" depends_on "foo" depends_on "bar" ^^^^^^^^^^^^^^^^ dependency "bar" (line 5) should be put before dependency "foo" (line 4) @@ -31,8 +31,8 @@ describe RuboCop::Cop::NewFormulaAudit::DependencyOrder do it "supports requirement constants" do expect_offense(<<~RUBY) class Foo < Formula - homepage "http://example.com" - url "http://example.com/foo-1.0.tgz" + homepage "https://example.com" + url "https://example.com/foo-1.0.tgz" depends_on FooRequirement depends_on "bar" ^^^^^^^^^^^^^^^^ dependency "bar" (line 5) should be put before dependency "FooRequirement" (line 4) @@ -43,8 +43,8 @@ describe RuboCop::Cop::NewFormulaAudit::DependencyOrder do it "wrong conditional depends_on order" do expect_offense(<<~RUBY) class Foo < Formula - homepage "http://example.com" - url "http://example.com/foo-1.0.tgz" + homepage "https://example.com" + url "https://example.com/foo-1.0.tgz" head do depends_on "apple" if build.with? "foo" depends_on "bar" @@ -62,8 +62,8 @@ describe RuboCop::Cop::NewFormulaAudit::DependencyOrder do it "correct depends_on order for multiple tags" do expect_no_offenses(<<~RUBY) class Foo < Formula - homepage "http://example.com" - url "http://example.com/foo-1.0.tgz" + homepage "https://example.com" + url "https://example.com/foo-1.0.tgz" depends_on "bar" => [:build, :test] depends_on "foo" => :build depends_on "apple" @@ -76,8 +76,8 @@ describe RuboCop::Cop::NewFormulaAudit::DependencyOrder do it "wrong conditional depends_on order" do source = <<~RUBY class Foo < Formula - homepage "http://example.com" - url "http://example.com/foo-1.0.tgz" + homepage "https://example.com" + url "https://example.com/foo-1.0.tgz" depends_on "apple" if build.with? "foo" depends_on "foo" => :optional end @@ -85,8 +85,8 @@ describe RuboCop::Cop::NewFormulaAudit::DependencyOrder do correct_source = <<~RUBY class Foo < Formula - homepage "http://example.com" - url "http://example.com/foo-1.0.tgz" + homepage "https://example.com" + url "https://example.com/foo-1.0.tgz" depends_on "foo" => :optional depends_on "apple" if build.with? "foo" end diff --git a/Library/Homebrew/test/rubocops/formula_desc_cop_spec.rb b/Library/Homebrew/test/rubocops/formula_desc_cop_spec.rb index 76782652c7..32a8e3f918 100644 --- a/Library/Homebrew/test/rubocops/formula_desc_cop_spec.rb +++ b/Library/Homebrew/test/rubocops/formula_desc_cop_spec.rb @@ -8,7 +8,7 @@ describe RuboCop::Cop::FormulaAudit::DescLength do expect_offense(<<~RUBY) class Foo < Formula ^^^^^^^^^^^^^^^^^^^ Formula should have a desc (Description). - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' end RUBY end @@ -16,7 +16,7 @@ describe RuboCop::Cop::FormulaAudit::DescLength do it "reports an offense when desc is an empty string" do expect_offense(<<~RUBY, "/homebrew-core/Formula/foo.rb") class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' desc '' ^^^^^^^ The desc (description) should not be an empty string. end @@ -26,7 +26,7 @@ describe RuboCop::Cop::FormulaAudit::DescLength do it "When desc is too long" do expect_offense(<<~RUBY, "/homebrew-core/Formula/foo.rb") class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' desc 'Bar#{"bar" * 29}' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description is too long. "name: desc" should be less than 80 characters. Length is calculated as foo + desc. (currently 95) end @@ -36,7 +36,7 @@ describe RuboCop::Cop::FormulaAudit::DescLength do it "When desc is multiline string" do expect_offense(<<~RUBY, "/homebrew-core/Formula/foo.rb") class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' desc 'Bar#{"bar" * 9}'\ '#{"foo" * 21}' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description is too long. "name: desc" should be less than 80 characters. Length is calculated as foo + desc. (currently 98) @@ -53,7 +53,7 @@ describe RuboCop::Cop::FormulaAuditStrict::Desc do it "When wrong \"command-line\" usage in desc" do expect_offense(<<~RUBY, "/homebrew-core/Formula/foo.rb") class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' desc 'command line' ^ Description should start with a capital letter ^^^^^^^^^^^^ Description should use \"command-line\" instead of \"command line\" @@ -64,7 +64,7 @@ describe RuboCop::Cop::FormulaAuditStrict::Desc do it "When an article is used in desc" do expect_offense(<<~RUBY, "/homebrew-core/Formula/foo.rb") class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' desc 'An aardvark' ^^^ Description shouldn\'t start with an indefinite article i.e. \"An\" end @@ -74,7 +74,7 @@ describe RuboCop::Cop::FormulaAuditStrict::Desc do it "When an lowercase letter starts a desc" do expect_offense(<<~RUBY, "/homebrew-core/Formula/foo.rb") class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' desc 'bar' ^ Description should start with a capital letter end @@ -84,7 +84,7 @@ describe RuboCop::Cop::FormulaAuditStrict::Desc do it "When formula name is in desc" do expect_offense(<<~RUBY, "/homebrew-core/Formula/foo.rb") class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' desc 'Foo is a foobar' ^^^^ Description shouldn\'t start with the formula name end @@ -94,7 +94,7 @@ describe RuboCop::Cop::FormulaAuditStrict::Desc do it "When the description ends with a full stop" do expect_offense(<<~RUBY, "/homebrew-core/Formula/foo.rb") class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' desc 'Description with a full stop at the end.' ^ Description shouldn\'t end with a full stop end @@ -104,7 +104,7 @@ describe RuboCop::Cop::FormulaAuditStrict::Desc do it "When the description starts with a leading space" do expect_offense(<<~RUBY, "/homebrew-core/Formula/foo.rb") class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' desc ' Description with a leading space' ^ Description shouldn\'t have a leading space end @@ -114,7 +114,7 @@ describe RuboCop::Cop::FormulaAuditStrict::Desc do it "When the description ends with a trailing space" do expect_offense(<<~RUBY, "/homebrew-core/Formula/foo.rb") class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' desc 'Description with a trailing space ' ^ Description shouldn\'t have a trailing space end @@ -124,14 +124,14 @@ describe RuboCop::Cop::FormulaAuditStrict::Desc do it "autocorrects all rules" do source = <<~RUBY class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' desc ' an bar: commandline foo ' end RUBY correct_source = <<~RUBY class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' desc 'an bar: command-line' end RUBY diff --git a/Library/Homebrew/test/rubocops/homepage_cop_spec.rb b/Library/Homebrew/test/rubocops/homepage_cop_spec.rb index f5ee83f6dc..2620572bba 100644 --- a/Library/Homebrew/test/rubocops/homepage_cop_spec.rb +++ b/Library/Homebrew/test/rubocops/homepage_cop_spec.rb @@ -7,7 +7,7 @@ describe RuboCop::Cop::FormulaAudit::Homepage do it "When there is no homepage" do source = <<~RUBY class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' end RUBY @@ -28,7 +28,7 @@ describe RuboCop::Cop::FormulaAudit::Homepage do source = <<~RUBY class Foo < Formula homepage "ftp://example.com/foo" - url "http://example.com/foo-1.0.tgz" + url "https://example.com/foo-1.0.tgz" end RUBY @@ -65,7 +65,7 @@ describe RuboCop::Cop::FormulaAudit::Homepage do source = <<~RUBY class #{name.capitalize} < Formula homepage "#{homepage}" - url "http://example.com/#{name}-1.0.tgz" + url "https://example.com/#{name}-1.0.tgz" end RUBY diff --git a/Library/Homebrew/test/rubocops/lines_cop_spec.rb b/Library/Homebrew/test/rubocops/lines_cop_spec.rb index 5048b118d1..00190a32b9 100644 --- a/Library/Homebrew/test/rubocops/lines_cop_spec.rb +++ b/Library/Homebrew/test/rubocops/lines_cop_spec.rb @@ -6,7 +6,7 @@ describe RuboCop::Cop::FormulaAudit::Lines do it "reports an offense when using depends_on :automake" do expect_offense(<<~RUBY) class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' depends_on :automake ^^^^^^^^^^^^^^^^^^^^ :automake is deprecated. Usage should be \"automake\". end @@ -16,7 +16,7 @@ describe RuboCop::Cop::FormulaAudit::Lines do it "reports an offense when using depends_on :autoconf" do expect_offense(<<~RUBY) class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' depends_on :autoconf ^^^^^^^^^^^^^^^^^^^^ :autoconf is deprecated. Usage should be \"autoconf\". end @@ -26,7 +26,7 @@ describe RuboCop::Cop::FormulaAudit::Lines do it "reports an offense when using depends_on :libtool" do expect_offense(<<~RUBY) class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' depends_on :libtool ^^^^^^^^^^^^^^^^^^^ :libtool is deprecated. Usage should be \"libtool\". end @@ -36,7 +36,7 @@ describe RuboCop::Cop::FormulaAudit::Lines do it "reports an offense when using depends_on :apr" do expect_offense(<<~RUBY) class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' depends_on :apr ^^^^^^^^^^^^^^^ :apr is deprecated. Usage should be \"apr-util\". end @@ -46,7 +46,7 @@ describe RuboCop::Cop::FormulaAudit::Lines do it "reports an offense when using depends_on :tex" do expect_offense(<<~RUBY) class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' depends_on :tex ^^^^^^^^^^^^^^^ :tex is deprecated. end @@ -62,7 +62,7 @@ describe RuboCop::Cop::FormulaAudit::ClassInheritance do class Foo, :exist?` instead of `assert File.exist? "default.ini"` end @@ -136,7 +136,7 @@ describe RuboCop::Cop::FormulaAudit::AssertStatements do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' assert !File.exist?("default.ini") ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use `refute_predicate , :exist?` instead of `assert !File.exist?("default.ini")` end @@ -147,7 +147,7 @@ describe RuboCop::Cop::FormulaAudit::AssertStatements do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' assert File.executable? f ^^^^^^^^^^^^^^^^^^ Use `assert_predicate , :executable?` instead of `assert File.executable? f` end @@ -162,7 +162,7 @@ describe RuboCop::Cop::FormulaAudit::OptionDeclarations do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' def post_install return unless build.without? "bar" ^^^^^^^^^^^^^^^^^^^^ Use if build.with? "bar" instead of unless build.without? "bar" @@ -175,7 +175,7 @@ describe RuboCop::Cop::FormulaAudit::OptionDeclarations do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' def post_install return unless build.with? "bar" ^^^^^^^^^^^^^^^^^ Use if build.without? "bar" instead of unless build.with? "bar" @@ -188,7 +188,7 @@ describe RuboCop::Cop::FormulaAudit::OptionDeclarations do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' def post_install return if !build.with? "bar" ^^^^^^^^^^^^^^^^^^ Don't negate 'build.with?': use 'build.without?' @@ -201,7 +201,7 @@ describe RuboCop::Cop::FormulaAudit::OptionDeclarations do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' def post_install return if !build.without? "bar" ^^^^^^^^^^^^^^^^^^^^^ Don't negate 'build.without?': use 'build.with?' @@ -214,7 +214,7 @@ describe RuboCop::Cop::FormulaAudit::OptionDeclarations do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' def post_install return if build.without? "--without-bar" ^^^^^^^^^^^^^ Don't duplicate 'without': Use `build.without? \"bar\"` to check for \"--without-bar\" @@ -227,7 +227,7 @@ describe RuboCop::Cop::FormulaAudit::OptionDeclarations do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' def post_install return if build.with? "--with-bar" ^^^^^^^^^^ Don't duplicate 'with': Use `build.with? \"bar\"` to check for \"--with-bar\" @@ -240,7 +240,7 @@ describe RuboCop::Cop::FormulaAudit::OptionDeclarations do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' def post_install return if build.include? "without-bar" ^^^^^^^^^^^ Use build.without? \"bar\" instead of build.include? 'without-bar' @@ -253,7 +253,7 @@ describe RuboCop::Cop::FormulaAudit::OptionDeclarations do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' def post_install return if build.include? "--bar" ^^^^^ Reference 'bar' without dashes @@ -266,7 +266,7 @@ describe RuboCop::Cop::FormulaAudit::OptionDeclarations do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' def options ^^^^^^^^^^^ Use new-style option definitions @@ -285,7 +285,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' FileUtils.mv "hello" ^^^^^^^^^^^^^^^^^^^^ Don\'t need \'FileUtils.\' before mv end @@ -296,7 +296,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' inreplace "foo" do |longvar| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ \"inreplace do |s|\" is preferred over \"|longvar|\". somerandomCall(longvar) @@ -309,7 +309,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' bottle do rebuild 0 ^^^^^^^^^ 'rebuild 0' should be removed @@ -323,7 +323,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY, "/homebrew-core/") class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' bottle do if OS.linux? ^^^^^^^^^ Don\'t use OS.linux?; Homebrew/core only supports macOS @@ -339,7 +339,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' bottle do sha256 "fe0679b932dd43a87fd415b609a7fbac7a069d117642ae8ebaac46ae1fb9f0b3" => :sierra end @@ -356,7 +356,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' def test ^^^^^^^^ Use new-style test definitions (test do) @@ -370,7 +370,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' skip_clean :all ^^^^^^^^^^^^^^^ `skip_clean :all` is deprecated; brew no longer strips symbols. Pass explicit paths to prevent Homebrew from removing empty folders. end @@ -381,7 +381,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' if build.universal? ^^^^^^^^^^^^^^^^ macOS has been 64-bit only since 10.6 so build.universal? is deprecated. "foo" @@ -394,7 +394,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_no_offenses(<<~RUBY, "/homebrew-core/Formula/wine.rb") class Wine < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' if build.universal? "foo" end @@ -406,7 +406,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' if build? ENV.universal_binary ^^^^^^^^^^^^^^^^^^^^ macOS has been 64-bit only since 10.6 so ENV.universal_binary is deprecated. @@ -419,7 +419,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_no_offenses(<<~RUBY, "/homebrew-core/Formula/wine.rb") class Wine < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' if build? ENV.universal_binary end @@ -431,7 +431,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' if build? ENV.x11 ^^^^^^^ Use "depends_on :x11" instead of "ENV.x11" @@ -444,7 +444,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' system "install_name_tool", "-id" ^^^^^^^^^^^^^^^^^ Use ruby-macho instead of calling "install_name_tool" end @@ -455,7 +455,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_no_offenses(<<~RUBY, "/homebrew-core/Formula/cctools.rb") class Cctools < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' system "install_name_tool", "-id" end RUBY @@ -465,7 +465,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' system "npm", "install" ^^^^^^^^^^^^^^^^^^^^^^^ Use Language::Node for npm install args end @@ -476,7 +476,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_no_offenses(<<~RUBY, "/homebrew-core/Formula/kibana@4.4.rb") class KibanaAT44 < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' system "npm", "install" end RUBY @@ -486,7 +486,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' depends_on FOO::BAR.new ^^^^^^^^^^^^ `depends_on` can take requirement classes instead of instances end @@ -497,7 +497,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' depends_on :foo if MacOS.snow_leopard? ^^^^^^^^^^^^^^^^^^^ \"MacOS.snow_leopard?\" is deprecated, use a comparison to MacOS.version instead end @@ -508,7 +508,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' rm_rf Dir["src/{llvm,test,librustdoc,etc/snapshot.pyc}"] rm_rf Dir["src/snapshot.pyc"] ^^^^^^^^^^^^^^^^ Dir(["src/snapshot.pyc"]) is unnecessary; just use "src/snapshot.pyc" @@ -520,7 +520,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' system "mkdir", "foo" ^^^^^ Use the `mkdir` Ruby method instead of `system "mkdir", "foo"` end @@ -535,7 +535,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do end class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' end RUBY end @@ -544,7 +544,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_no_offenses(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' def install verbose = ARGV.verbose? end @@ -556,7 +556,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' def install man1.install man+"man8" => "faad.1" ^^^^ "man+"man8"" should be "man8" @@ -569,7 +569,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~'RUBY') class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' def install system "/usr/bin/gcc", "foo" ^^^^^^^^^^^^ Use "#{ENV.cc}" instead of hard-coding "gcc" @@ -582,7 +582,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~'RUBY') class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' def install system "/usr/bin/g++", "-o", "foo", "foo.cc" ^^^^^^^^^^^^ Use "#{ENV.cxx}" instead of hard-coding "g++" @@ -595,7 +595,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~'RUBY') class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' def install ENV["COMPILER_PATH"] = "/usr/bin/llvm-g++" ^^^^^^^^^^^^^^^^^ Use "#{ENV.cxx}" instead of hard-coding "llvm-g++" @@ -608,7 +608,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' def install ENV["COMPILER_PATH"] = "/usr/bin/gcc" ^^^^^^^^^^^^ Use \"\#{ENV.cc}\" instead of hard-coding \"gcc\" @@ -621,7 +621,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~'RUBY') class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' def install mv "#{share}/man", share ^^^^ "#{share}/man" should be "#{man}" @@ -634,7 +634,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~'RUBY') class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' def install mv "#{prefix}/libexec", share ^^^^^^^^ "#{prefix}/libexec" should be "#{libexec}" @@ -647,7 +647,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~'RUBY') class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' def install system "./configure", "--INFODIR=#{prefix}/share/info" ^^^^^^ "#{prefix}/share" should be "#{share}" @@ -661,7 +661,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~'RUBY') class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' def install system "./configure", "--MANDIR=#{prefix}/share/man/man8" ^^^^^^ "#{prefix}/share" should be "#{share}" @@ -675,7 +675,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' depends_on "lpeg" => :lua51 ^^^^^ lua modules should be vendored rather than use deprecated depends_on \"lpeg\" => :lua51` end @@ -686,7 +686,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' system "export", "var=value" ^^^^^^ Use ENV instead of invoking 'export' to modify the environment end @@ -697,7 +697,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' depends_on "foo" => "with-bar" ^^^^^^^^ Dependency foo should not use option with-bar end @@ -708,7 +708,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' depends_on "httpd" => [:build, :test] depends_on "foo" => [:optional, "with-bar"] ^^^^^^^^ Dependency foo should not use option with-bar @@ -722,7 +722,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' if version == "HEAD" ^^^^^^^^^^^^^^^^^ Use 'build.head?' instead of inspecting 'version' foo() @@ -735,7 +735,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' test do head = ARGV.include? "--HEAD" ^^^^^^ Use "if build.head?" instead @@ -749,7 +749,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' needs :openmp ^^^^^^^^^^^^^ 'needs :openmp' should be replaced with 'depends_on \"gcc\"' end @@ -760,7 +760,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' test do version = MACOS_VERSION ^^^^^^^^^^^^^ Use MacOS.version instead of MACOS_VERSION @@ -773,7 +773,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' depends_on "foo" if build.with? "foo" ^^^^^^^^^^^^^^^^ Replace depends_on "foo" if build.with? "foo" with depends_on "foo" => :optional end @@ -784,7 +784,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' depends_on :foo unless build.without? "foo" ^^^^^^^^^^^^^^^ Replace depends_on :foo unless build.without? "foo" with depends_on :foo => :recommended end @@ -795,7 +795,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do expect_offense(<<~RUBY) class Foo < Formula desc "foo" - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' depends_on :foo unless build.include? "without-foo" ^^^^^^^^^^^^^^^ Replace depends_on :foo unless build.include? "without-foo" with depends_on :foo => :recommended end diff --git a/Library/Homebrew/test/rubocops/options_cop_spec.rb b/Library/Homebrew/test/rubocops/options_cop_spec.rb index de3e2a205a..79f1d0d522 100644 --- a/Library/Homebrew/test/rubocops/options_cop_spec.rb +++ b/Library/Homebrew/test/rubocops/options_cop_spec.rb @@ -6,7 +6,7 @@ describe RuboCop::Cop::FormulaAudit::Options do it "reports an offense when using the 32-bit option" do expect_offense(<<~RUBY) class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' option "32-bit", "with 32-bit" ^^^^^^ macOS has been 64-bit only since 10.6 so 32-bit options are deprecated. end @@ -21,7 +21,7 @@ describe RuboCop::Cop::FormulaAuditStrict::Options do it "with universal" do expect_offense(<<~RUBY) class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' option :universal ^^^^^^^^^^^^^^^^^ macOS has been 64-bit only since 10.6 so universal options are deprecated. end @@ -31,7 +31,7 @@ describe RuboCop::Cop::FormulaAuditStrict::Options do it "with deprecated options" do expect_offense(<<~RUBY) class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' option :cxx11 option "examples", "with-examples" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Options should begin with with/without. Migrate '--examples' with `deprecated_option`. @@ -42,7 +42,7 @@ describe RuboCop::Cop::FormulaAuditStrict::Options do it "with misc deprecated options" do expect_offense(<<~RUBY) class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' option "without-check" ^^^^^^^^^^^^^^^^^^^^^^ Use '--without-test' instead of '--without-check'. Migrate '--without-check' with `deprecated_option`. end @@ -58,7 +58,7 @@ describe RuboCop::Cop::NewFormulaAudit::Options do it "with deprecated options" do expect_offense(<<~RUBY) class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' deprecated_option "examples" => "with-examples" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ New formulae should not use `deprecated_option` end @@ -68,7 +68,7 @@ describe RuboCop::Cop::NewFormulaAudit::Options do it "with options" do expect_offense(<<~RUBY, "/homebrew-core/") class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' option "with-examples" ^^^^^^^^^^^^^^^^^^^^^^ Formulae should not have an `option` end diff --git a/Library/Homebrew/test/rubocops/patches_cop_spec.rb b/Library/Homebrew/test/rubocops/patches_cop_spec.rb index 1c146c0c51..8f5f96e660 100644 --- a/Library/Homebrew/test/rubocops/patches_cop_spec.rb +++ b/Library/Homebrew/test/rubocops/patches_cop_spec.rb @@ -7,7 +7,7 @@ describe RuboCop::Cop::FormulaAudit::Patches do it "When there is no legacy patch" do expect_no_offenses(<<~RUBY) class Foo < Formula - url 'http://example.com/foo-1.0.tgz' + url 'https://example.com/foo-1.0.tgz' end RUBY end @@ -16,7 +16,7 @@ describe RuboCop::Cop::FormulaAudit::Patches do expect_offense(<<~RUBY) class Foo < Formula homepage "ftp://example.com/foo" - url "http://example.com/foo-1.0.tgz" + url "https://example.com/foo-1.0.tgz" def patches ^^^^^^^^^^^ Use the patch DSL instead of defining a 'patches' method DATA @@ -38,7 +38,7 @@ describe RuboCop::Cop::FormulaAudit::Patches do source = <<~EOS class Foo < Formula homepage "ftp://example.com/foo" - url "http://example.com/foo-1.0.tgz" + url "https://example.com/foo-1.0.tgz" def patches "#{patch_url}" end @@ -116,7 +116,7 @@ describe RuboCop::Cop::FormulaAudit::Patches do source = <<~RUBY class Foo < Formula homepage "ftp://example.com/foo" - url "http://example.com/foo-1.0.tgz" + url "https://example.com/foo-1.0.tgz" def patches files = %w[patch-domain_resolver.c patch-colormask.c patch-trafshow.c patch-trafshow.1 patch-configure] { @@ -165,7 +165,7 @@ describe RuboCop::Cop::FormulaAudit::Patches do source = <<~RUBY class Foo < Formula homepage "ftp://example.com/foo" - url "http://example.com/foo-1.0.tgz" + url "https://example.com/foo-1.0.tgz" patch do url "#{patch_url}" sha256 "63376b8fdd6613a91976106d9376069274191860cd58f039b29ff16de1925621" diff --git a/Library/Homebrew/test/rubocops/text_cop_spec.rb b/Library/Homebrew/test/rubocops/text_cop_spec.rb index 3f5d8f10a1..e09f99c782 100644 --- a/Library/Homebrew/test/rubocops/text_cop_spec.rb +++ b/Library/Homebrew/test/rubocops/text_cop_spec.rb @@ -7,8 +7,8 @@ describe RuboCop::Cop::FormulaAudit::Text do it "with both openssl and libressl optional dependencies" do expect_offense(<<~RUBY) class Foo < Formula - url "http://example.com/foo-1.0.tgz" - homepage "http://example.com" + url "https://example.com/foo-1.0.tgz" + homepage "https://example.com" depends_on "openssl" depends_on "libressl" => :optional @@ -20,8 +20,8 @@ describe RuboCop::Cop::FormulaAudit::Text do it "with both openssl and libressl dependencies" do expect_offense(<<~RUBY) class Foo < Formula - url "http://example.com/foo-1.0.tgz" - homepage "http://example.com" + url "https://example.com/foo-1.0.tgz" + homepage "https://example.com" depends_on "openssl" depends_on "libressl" @@ -33,8 +33,8 @@ describe RuboCop::Cop::FormulaAudit::Text do it "When xcodebuild is called without SYMROOT" do expect_offense(<<~RUBY) class Foo < Formula - url "http://example.com/foo-1.0.tgz" - homepage "http://example.com" + url "https://example.com/foo-1.0.tgz" + homepage "https://example.com" def install xcodebuild "-project", "meow.xcodeproject" @@ -47,8 +47,8 @@ describe RuboCop::Cop::FormulaAudit::Text do it "When xcodebuild is called without any args" do expect_offense(<<~RUBY) class Foo < Formula - url "http://example.com/foo-1.0.tgz" - homepage "http://example.com" + url "https://example.com/foo-1.0.tgz" + homepage "https://example.com" def install xcodebuild @@ -61,8 +61,8 @@ describe RuboCop::Cop::FormulaAudit::Text do it "When go get is executed" do expect_offense(<<~RUBY) class Foo < Formula - url "http://example.com/foo-1.0.tgz" - homepage "http://example.com" + url "https://example.com/foo-1.0.tgz" + homepage "https://example.com" def install system "go", "get", "bar" @@ -75,8 +75,8 @@ describe RuboCop::Cop::FormulaAudit::Text do it "When xcodebuild is executed" do expect_offense(<<~RUBY) class Foo < Formula - url "http://example.com/foo-1.0.tgz" - homepage "http://example.com" + url "https://example.com/foo-1.0.tgz" + homepage "https://example.com" def install system "xcodebuild", "foo", "bar" @@ -89,8 +89,8 @@ describe RuboCop::Cop::FormulaAudit::Text do it "When scons is executed" do expect_offense(<<~RUBY) class Foo < Formula - url "http://example.com/foo-1.0.tgz" - homepage "http://example.com" + url "https://example.com/foo-1.0.tgz" + homepage "https://example.com" def install system "scons", "foo", "bar" @@ -103,8 +103,8 @@ describe RuboCop::Cop::FormulaAudit::Text do it "When plist_options are not defined when using a formula-defined plist", :ruby23 do expect_offense(<<~RUBY) class Foo < Formula - url "http://example.com/foo-1.0.tgz" - homepage "http://example.com" + url "https://example.com/foo-1.0.tgz" + homepage "https://example.com" def install system "xcodebuild", "foo", "bar" @@ -134,8 +134,8 @@ describe RuboCop::Cop::FormulaAudit::Text do ^^^^^^^^^^^^^^^^^^^^^ require "language/go" is unnecessary unless using `go_resource`s class Foo < Formula - url "http://example.com/foo-1.0.tgz" - homepage "http://example.com" + url "https://example.com/foo-1.0.tgz" + homepage "https://example.com" def install system "go", "get", "bar" @@ -148,8 +148,8 @@ describe RuboCop::Cop::FormulaAudit::Text do it "When formula uses virtualenv and also `setuptools` resource" do expect_offense(<<~RUBY) class Foo < Formula - url "http://example.com/foo-1.0.tgz" - homepage "http://example.com" + url "https://example.com/foo-1.0.tgz" + homepage "https://example.com" resource "setuptools" do ^^^^^^^^^^^^^^^^^^^^^ Formulae using virtualenvs do not need a `setuptools` resource. @@ -167,8 +167,8 @@ describe RuboCop::Cop::FormulaAudit::Text do it "When Formula.factory(name) is used" do expect_offense(<<~RUBY) class Foo < Formula - url "http://example.com/foo-1.0.tgz" - homepage "http://example.com" + url "https://example.com/foo-1.0.tgz" + homepage "https://example.com" def install Formula.factory(name) @@ -181,8 +181,8 @@ describe RuboCop::Cop::FormulaAudit::Text do it "When dep ensure is used without `-vendor-only`" do expect_offense(<<~RUBY) class Foo < Formula - url "http://example.com/foo-1.0.tgz" - homepage "http://example.com" + url "https://example.com/foo-1.0.tgz" + homepage "https://example.com" def install system "dep", "ensure" @@ -195,8 +195,8 @@ describe RuboCop::Cop::FormulaAudit::Text do it "When cargo build is executed" do expect_offense(<<~RUBY) class Foo < Formula - url "http://example.com/foo-1.0.tgz" - homepage "http://example.com" + url "https://example.com/foo-1.0.tgz" + homepage "https://example.com" def install system "cargo", "build" diff --git a/Library/Homebrew/test/utils/svn_spec.rb b/Library/Homebrew/test/utils/svn_spec.rb index f7ea91ec87..d3f0fe36df 100644 --- a/Library/Homebrew/test/utils/svn_spec.rb +++ b/Library/Homebrew/test/utils/svn_spec.rb @@ -31,10 +31,9 @@ describe Utils do end it "returns true when remote exists", :needs_network, :needs_svn do - remote = "http://github.com/Homebrew/install" - svn = HOMEBREW_SHIMS_PATH/"scm/svn" - - HOMEBREW_CACHE.cd { system svn, "checkout", remote } + HOMEBREW_CACHE.cd do + system HOMEBREW_SHIMS_PATH/"scm/svn", "checkout", "https://github.com/Homebrew/install" + end expect(described_class).to be_svn_remote_exists(HOMEBREW_CACHE/"install") end