From f87fadd4ee7a5f157df6813c233b9e8684a66a4b Mon Sep 17 00:00:00 2001 From: JCount Date: Mon, 26 Jun 2017 16:16:45 -0400 Subject: version: improve parsing of url-only, non-filename versions add support for styles prefixed with a r,v,V and an optional _ , and styles with four groups of digits, seperated by periods; combinations of the two are also supported --- Library/Homebrew/version.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/version.rb b/Library/Homebrew/version.rb index f99914c4d..5e8ba7a43 100644 --- a/Library/Homebrew/version.rb +++ b/Library/Homebrew/version.rb @@ -407,8 +407,13 @@ class Version # e.g. http://mirrors.jenkins-ci.org/war/1.486/jenkins.war # e.g. https://github.com/foo/bar/releases/download/0.10.11/bar.phar - m = %r{/(\d\.\d+(\.\d+)?)}.match(spec_s) - return m.captures.first unless m.nil? + # e.g. https://github.com/clojure/clojurescript/releases/download/r1.9.293/cljs.jar + # e.g. https://github.com/fibjs/fibjs/releases/download/v0.6.1/fullsrc.zip + # e.g. https://wwwlehre.dhbw-stuttgart.de/~sschulz/WORK/E_DOWNLOAD/V_1.9/E.tgz + # e.g. https://github.com/JustArchi/ArchiSteamFarm/releases/download/2.3.2.0/ASF.zip + # e.g. https://people.gnome.org/~newren/eg/download/1.7.5.2/eg + m = %r{/([rvV]_?)?(\d\.\d+(\.\d+){,2})}.match(spec_s) + return m.captures[1] unless m.nil? # e.g. http://www.ijg.org/files/jpegsrc.v8d.tar.gz m = /\.v(\d+[a-z]?)/.match(stem) -- cgit v1.2.3 /open-babel.rb'>logtreecommitdiffstats
path: root/Library/Formula/open-babel.rb
blob: 33db3938e1b22eb967978530698d2604e0e33958 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82