diff --git a/Library/Homebrew/cmd/readall.rb b/Library/Homebrew/cmd/readall.rb index 2eedf9cb59..7a8a066aaa 100644 --- a/Library/Homebrew/cmd/readall.rb +++ b/Library/Homebrew/cmd/readall.rb @@ -19,7 +19,7 @@ module Homebrew switch "--aliases", description: "Verify any alias symlinks in each tap." switch "--syntax", - description: "Syntax-check all of Homebrew's Ruby files." + description: "Syntax-check all of Homebrew's Ruby files (if no `` is passed)." switch :verbose switch :debug end @@ -28,7 +28,7 @@ module Homebrew def readall readall_args.parse - if args.syntax? + if args.syntax? && args.no_named? scan_files = "#{HOMEBREW_LIBRARY_PATH}/**/*.rb" ruby_files = Dir.glob(scan_files).reject { |file| file =~ %r{/(vendor)/} } diff --git a/Library/Homebrew/test/cmd/readall_spec.rb b/Library/Homebrew/test/cmd/readall_spec.rb index ad073df9ee..245f1fde68 100644 --- a/Library/Homebrew/test/cmd/readall_spec.rb +++ b/Library/Homebrew/test/cmd/readall_spec.rb @@ -6,7 +6,7 @@ describe "Homebrew.readall_args" do it_behaves_like "parseable arguments" end -describe "brew readall", :integration_test, timeout: 240 do +describe "brew readall", :integration_test do it "imports all Formulae for a given Tap" do formula_file = setup_test_formula "testball" @@ -15,7 +15,7 @@ describe "brew readall", :integration_test, timeout: 240 do FileUtils.ln_s formula_file, alias_file - expect { brew "readall", "--aliases", "--syntax" } + expect { brew "readall", "--aliases", "--syntax", CoreTap.instance.name } .to be_a_success .and not_to_output.to_stdout .and not_to_output.to_stderr diff --git a/Library/Homebrew/test/formula_info_spec.rb b/Library/Homebrew/test/formula_info_spec.rb index c936dbef76..4e1f416529 100644 --- a/Library/Homebrew/test/formula_info_spec.rb +++ b/Library/Homebrew/test/formula_info_spec.rb @@ -7,41 +7,16 @@ describe FormulaInfo, :integration_test do it "tests the FormulaInfo class" do install_test_formula "testball" - expect( - described_class.lookup(Formula["testball"].path) - .revision, - ).to eq(0) + info = described_class.lookup(Formula["testball"].path) + expect(info).not_to be_nil + expect(info.revision).to eq(0) + expect(info.bottle_tags).to eq([]) + expect(info.bottle_info).to be_nil + expect(info.bottle_info_any).to be_nil + expect(info.any_bottle_tag).to be_nil + expect(info.version(:stable).to_s).to eq("0.1") - expect( - described_class.lookup(Formula["testball"].path) - .bottle_tags, - ).to eq([]) - - expect( - described_class.lookup(Formula["testball"].path) - .bottle_info, - ).to eq(nil) - - expect( - described_class.lookup(Formula["testball"].path) - .bottle_info_any, - ).to eq(nil) - - expect( - described_class.lookup(Formula["testball"].path) - .any_bottle_tag, - ).to eq(nil) - - expect( - described_class.lookup(Formula["testball"].path) - .version(:stable).to_s, - ).to eq("0.1") - - version = described_class.lookup(Formula["testball"].path) - .version(:stable) - expect( - described_class.lookup(Formula["testball"].path) - .pkg_version, - ).to eq(PkgVersion.new(version, 0)) + version = info.version(:stable) + expect(info.pkg_version).to eq(PkgVersion.new(version, 0)) end end diff --git a/docs/Manpage.md b/docs/Manpage.md index 95fdb45010..21cc2e5521 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -379,7 +379,7 @@ items or checking if any current formulae/casks have Ruby issues. * `--aliases`: Verify any alias symlinks in each tap. * `--syntax`: - Syntax-check all of Homebrew's Ruby files. + Syntax-check all of Homebrew's Ruby files (if no `*`tap`*` is passed). ### `reinstall` [*`options`*] *`formula`* diff --git a/manpages/brew.1 b/manpages/brew.1 index 7599f4804d..9187c13935 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -498,7 +498,7 @@ Verify any alias symlinks in each tap\. . .TP \fB\-\-syntax\fR -Syntax\-check all of Homebrew\'s Ruby files\. +Syntax\-check all of Homebrew\'s Ruby files (if no \fB\fR is passed)\. . .SS "\fBreinstall\fR [\fIoptions\fR] \fIformula\fR" Uninstall and then install \fIformula\fR using the same options it was originally installed with, plus any appended brew formula options\.