Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Library/Homebrew/test/language/node_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
describe "#setup_npm_environment" do
it "calls prepend_path when node formula exists only during the first call" do
node = formula "node" do
url "node-test"
url "node-test-v1.0"
end
stub_formula_loader(node)
expect(ENV).to receive(:prepend_path)
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/test/version_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@

specify "from tag" do
expect(described_class.create("1.2.3"))
.to be_detected_from("https://github.com/foo/bar.git", tag: "v1.2.3")
.to be_detected_from("https://github.com/foo/bar.git", tag: "v1.2.3-stable")
end

specify "beta from tag" do
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,11 @@ def self._parse(spec)
return m.captures.first unless m.nil?

# e.g. https://www.openssl.org/source/openssl-0.9.8s.tar.gz
m = /-v?([^-]+)/.match(stem)
m = /-v?(\d[^-]+)/.match(stem)
return m.captures.first unless m.nil?

# e.g. astyle_1.23_macosx.tar.gz
m = /_([^_]+)/.match(stem)
m = /_v?(\d[^_]+)/.match(stem)
return m.captures.first unless m.nil?

# e.g. http://mirrors.jenkins-ci.org/war/1.486/jenkins.war
Expand Down