blob: 66036d927f5e71d07be473141ed3fa9bee38847b (
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
|
require 'formula'
class TestBall < Formula
# name parameter required for some Formula::factory
def initialize name=nil
@url="file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz"
@homepage = 'http://example.com/'
super "testball"
end
def install
prefix.install "bin"
prefix.install "libexec"
end
end
class TestBallWithRealPath < TestBall
def initialize name=nil
super "testballwithrealpath"
@path = Pathname.new(__FILE__)
end
end
class TestBallWithMirror < Formula
# `url` is bogus---curl should fail to download it. The mirror is fine
# though.
url "file:///#{TEST_FOLDER}/bad_url/testball-0.1.tbz"
mirror "file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz"
def initialize name=nil
@homepage = 'http://example.com/'
super "testballwithmirror"
end
end
class ConfigureFails < Formula
# name parameter required for some Formula::factory
def initialize name=nil
@url="file:///#{TEST_FOLDER}/tarballs/configure_fails.tar.gz"
@homepage = 'http://example.com/'
@version = '1.0.0'
@md5 = '9385e1b68ab8af68ac2c35423443159b'
super "configurefails"
end
def install
system "./configure"
end
end
class TestCompilerFailures < Formula
def initialize name=nil
@url="file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz"
@homepage = 'http://example.com/'
super "compilerfailures"
end
end
class TestAllCompilerFailures < TestCompilerFailures
fails_with :clang
fails_with :llvm
fails_with :gcc
end
class TestNoCompilerFailures < TestCompilerFailures
fails_with(:clang) { build 42 }
fails_with(:llvm) { build 42 }
fails_with(:gcc) { build 42 }
end
class TestLLVMFailure < TestCompilerFailures
fails_with :llvm
end
class TestMixedCompilerFailures < TestCompilerFailures
fails_with(:clang) { build MacOS.clang_build_version }
fails_with(:llvm) { build 42 }
fails_with(:gcc) { build 5666 }
end
class TestMoreMixedCompilerFailures < TestCompilerFailures
fails_with(:clang) { build 42 }
fails_with(:llvm) { build 2336 }
fails_with(:gcc) { build 5666 }
end
class TestEvenMoreMixedCompilerFailures < TestCompilerFailures
fails_with :clang
fails_with(:llvm) { build 2336 }
fails_with(:gcc) { build 5648 }
end
class TestBlockWithoutBuildCompilerFailure < TestCompilerFailures
fails_with :clang do
cause "failure"
end
end
class SpecTestBall < Formula
homepage 'http://example.com'
url 'file:///foo.com/testball-0.1.tbz'
mirror 'file:///foo.org/testball-0.1.tbz'
sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5'
head 'https://github.com/mxcl/homebrew.git', :tag => 'foo'
devel do
url 'file:///foo.com/testball-0.2.tbz'
mirror 'file:///foo.org/testball-0.2.tbz'
sha256 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef'
end
bottle do
sha1 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' => :snowleopard
sha1 'baadf00dbaadf00dbaadf00dbaadf00dbaadf00d' => :lion
sha1 '8badf00d8badf00d8badf00d8badf00d8badf00d' => :mountainlion
end
def initialize name=nil
super "spectestball"
end
end
class AncientSpecTestBall < Formula
@homepage='http://example.com'
@url='file:///foo.com/testball-0.1.tbz'
@md5='060844753f2a3b36ecfc3192d307dab2'
@head='https://github.com/mxcl/homebrew.git'
@specs={ :tag => 'foo' }
def initialize name=nil
super "ancientspectestball"
end
end
class ExplicitVersionSpecTestBall < Formula
homepage 'http://example.com'
url 'file:///foo.com/testball-stable.tbz'
sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5'
version '0.3'
devel do
url 'file:///foo.com/testball-devel.tbz'
sha1 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef'
version '0.4'
end
bottle do
version '1'
url 'file:///foo.com/test-0.3.lion.bottle.tar.gz'
sha1 'baadf00dbaadf00dbaadf00dbaadf00dbaadf00d'
end
def initialize name=nil
super "explicitversionspectestball"
end
end
class OldBottleSpecTestBall < Formula
homepage 'http://example.com'
url 'file:///foo.com/testball-0.1.tbz'
sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5'
bottle do
url 'file:///foo.com/testball-0.1-bottle.tar.gz'
sha1 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef'
end
def initialize name=nil
super "oldbottlespectestball"
end
end
class AncientBottleSpecTestBall < Formula
homepage 'http://example.com'
url 'file:///foo.com/testball-0.1.tbz'
sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5'
bottle 'file:///foo.com/testball-0.1-bottle.tar.gz'
bottle_sha1 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef'
def initialize name=nil
super "ancientbottlespectestball"
end
end
class HeadOnlySpecTestBall < Formula
homepage 'http://example.com'
head 'https://github.com/mxcl/homebrew.git'
def initialize name=nil
super "headyonlyspectestball"
end
end
class IncompleteStableSpecTestBall < Formula
homepage 'http://example.com'
head 'https://github.com/mxcl/homebrew.git'
sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5'
def initialize name=nil
super "incompletestablespectestball"
end
end
class HeadOnlyWithVersionSpecTestBall < Formula
homepage 'http://example.com'
head 'https://github.com/mxcl/homebrew.git'
version '0.3'
def initialize name=nil
super "headonlywithversionspectestball"
end
end
class ExplicitStrategySpecTestBall < Formula
homepage 'http://example.com'
url 'file:///foo.com/testball-stable', :using => :hg, :tag => '0.2'
head 'file:///foo.com/testball-head', :using => :svn
devel do
url 'file:///foo.com/testball-devel', :using => :bzr, :tag => '0.3'
end
def initialize name=nil
super "explicitstrategyspectestball"
end
end
class SnowLeopardBottleSpecTestBall < Formula
homepage 'http://example.com'
url 'file:///foo.com/testball-0.1.tbz'
sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5'
bottle do
sha1 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' => :snowleopard
end
def initialize name=nil
super "snowleopardbottlespectestball"
end
end
class LionBottleSpecTestBall < Formula
homepage 'http://example.com'
url 'file:///foo.com/testball-0.1.tbz'
sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5'
bottle do
sha1 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' => :lion
end
def initialize name=nil
super "lionbottlespectestball"
end
end
class AllCatsBottleSpecTestBall < Formula
homepage 'http://example.com'
url 'file:///foo.com/testball-0.1.tbz'
sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5'
bottle do
sha1 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' => :snowleopard
sha1 'baadf00dbaadf00dbaadf00dbaadf00dbaadf00d' => :lion
sha1 '8badf00d8badf00d8badf00d8badf00d8badf00d' => :mountainlion
end
def initialize name=nil
super "allcatsbottlespectestball"
end
end
class RevisedBottleSpecTestBall < Formula
homepage 'http://example.com'
url 'file:///foo.com/testball-0.1.tbz'
sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5'
bottle do
version 1
sha1 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' => :snowleopard
sha1 'baadf00dbaadf00dbaadf00dbaadf00dbaadf00d' => :lion
sha1 '8badf00d8badf00d8badf00d8badf00d8badf00d' => :mountainlion
end
def initialize name=nil
super "revisedbottlespectestball"
end
end
|